Custom defined command doesn't with with such.
Opened this issue · 5 comments
As a workaround for plz
not supporting multiple commands, I've tried to use a pre-defined alias for a command.
commands in ThisBuild += Command.command("testsWithCoverage") { state =>
"coverage" ::
"test" ::
"coverageReport" ::
"coverageAggregate" ::
"coveralls" ::
state
},
And then run any of such testsWithCoverage
, very testsWithCoverage
and so on. None of them work.
[error] Expected configuration
[error] Expected ':' (if selecting a configuration)
[error] Expected key
Not a valid key: testsWithCoverage (similar: testFilter)
Is there a way to fix this?
I haven't found one, but a simple work around is to specify multiple commands, i.e. sbt 'plz clean' 'plz test'
. This doesn't support commands though (like coverage
, coveralls
etc.), see #13.
Hi @eed3si9n Any suggestions how I can patch doge? SBT isn't my area of expertise by far, but if you have a link exemplifying multi command parsers in some other SBT plugin, I'll commit some time to come up with a PR because it's really blocking a lot of our projects unfortunately.
I can't drop doge and I can't add the rest of what we need, bad place to be in, but with some pointing in the right direction I'll try and fix this for everyone.
This was fixed in sbt 1.0.1 - sbt/sbt#3446
@eed3si9n As I understand SBT 1.0.1 one only works with JDK 8. Correct me if I am saying something stupid, but as I understand it bumping the SBT version would cause all our non JDK 8 builds to fail correct?
That is correct. I didn't mean to suggest that you can upgrade to sbt 1.0.1 immediately. Instead, you can lift the fix from the PR and port it to doge if you want.