The verify and publish tasks use sys.exit(0) on success, and sys.exit(1) on failure. This works fine when you run the command in isolation (e.g. sbt pactPublish), but if you try to run them as part of a sequence of events, either with addCommandAlias or Def.sequential, the sys.exit causes the process to end without running subsequent tasks. For example:
The verify and publish tasks use
sys.exit(0)
on success, andsys.exit(1)
on failure. This works fine when you run the command in isolation (e.g.sbt pactPublish
), but if you try to run them as part of a sequence of events, either withaddCommandAlias
orDef.sequential
, thesys.exit
causes the process to end without running subsequent tasks. For example:Will only run
pactPublish
and then exit, even on success. Usingsys.exit(1)
on failure seems fine, but on successsys.exit
should not be used at all.See: