Closed philwalk closed 1 month ago
This is likely caused by https://github.com/VirtusLab/scala-cli/pull/3079 We are now looking for main classes in dependency JARs as well, which should perhaps be opt in behind a flag, unless no explicit inputs are passed.
Scala-Cli Version
When attempting to test the new @arguments file feature, as suggested here, it fails if any entries in the classpath have a
Main-Class
property defined in theMANIFEST.MF
.To Reproduce
Create an
args.txt
to define a classpath having one or moreexecutable
jar files (any jar file withMain-Class
defined in theMANIFEST.MF
).scala-cli run -e 'println("Hey, I am using an @args file!")' @args.txt
Here's what happens with the above example
@args
file:Here are a few common libraries that are executable, no doubt there are many more:
Expected behaviour A classpath defined in an
@arguments file
should be prepended to the classpath, but should not otherwise affect the behavior ofscala-cli
.