tools/admin/src/main/scala/org/apache/openwhisk/core/cli/Main.scala contains code copied from Scallop, which is MIT-licensed:
private def printErr(message: String): Unit = {
//Taken from ScallopConf
if (overrideColorOutput.value.getOrElse(System.console() != null)) {
Console.err.println("[\u001b[31m%s\u001b[0m] Error: %s" format (printedName, message))
} else {
// no colors on output
Console.err.println("[%s] Error: %s" format (printedName, message))
}
}
It was added in daa14c6 (#3722, 2018), when the admin tool depended on Scallop 3.1.2. It is Scallop's default errorMessageHandler, minus the final sys.exit(1): see jvm/src/main/scala/org.rogach.scallop/ScallopConf.scala lines 73-81 at v3.1.2:
errorMessageHandler = { message =>
if (overrideColorOutput.value.getOrElse(System.console() != null)) {
Console.err.println("[\u001b[31m%s\u001b[0m] Error: %s" format (printedName, message))
} else {
// no colors on output
Console.err.println("[%s] Error: %s" format (printedName, message))
}
sys.exit(1)
}
Scallop is licensed under the MIT License, Copyright (C) 2012 Platon Pronko and Chris Hodapp. MIT is Category A, so the code can be included, but the MIT licence requires its copyright and permission notice to be kept with copied code. Currently the file only carries the ASF header, and neither LICENSE.txt nor NOTICE.txt mentions Scallop.
Suggested fix, either:
- Rewrite
printErr independently (it is a few lines of error printing) and drop the "Taken from ScallopConf" comment; or
- Keep it, add the Scallop copyright line to the file below the ASF header, and add an entry to
LICENSE.txt for Scallop (MIT, with its copyright line and licence text), naming the file.
Apache OpenServerless vendors this file and tracks the same problem in apache/openserverless#264.
tools/admin/src/main/scala/org/apache/openwhisk/core/cli/Main.scalacontains code copied from Scallop, which is MIT-licensed:It was added in daa14c6 (#3722, 2018), when the admin tool depended on Scallop 3.1.2. It is Scallop's default
errorMessageHandler, minus the finalsys.exit(1): seejvm/src/main/scala/org.rogach.scallop/ScallopConf.scalalines 73-81 at v3.1.2:Scallop is licensed under the MIT License,
Copyright (C) 2012 Platon Pronko and Chris Hodapp. MIT is Category A, so the code can be included, but the MIT licence requires its copyright and permission notice to be kept with copied code. Currently the file only carries the ASF header, and neitherLICENSE.txtnorNOTICE.txtmentions Scallop.Suggested fix, either:
printErrindependently (it is a few lines of error printing) and drop the "Taken from ScallopConf" comment; orLICENSE.txtfor Scallop (MIT, with its copyright line and licence text), naming the file.Apache OpenServerless vendors this file and tracks the same problem in apache/openserverless#264.