File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,16 @@ function printSbtTask(task: string, cwd?: string): Promise<string> {
25
25
reject ( new Error ( `sbt invocation for Scala.js compilation could not start. Is it installed?\n${ err } ` ) ) ;
26
26
} ) ;
27
27
child . on ( 'close' , code => {
28
- if ( code !== 0 )
29
- reject ( new Error ( `sbt invocation for Scala.js compilation failed with exit code ${ code } .` ) ) ;
30
- else
28
+ if ( code !== 0 ) {
29
+ let errorMessage = `sbt invocation for Scala.js compilation failed with exit code ${ code } .` ;
30
+ if ( fullOutput . includes ( "Not a valid command: --" ) ) {
31
+ errorMessage += "\nCause: Your sbt launcher script version is too old (<1.3.3)."
32
+ errorMessage += "\nFix: Re-install the latest version of sbt launcher script from https://www.scala-sbt.org/"
33
+ }
34
+ reject ( new Error ( errorMessage ) ) ;
35
+ } else {
31
36
resolve ( fullOutput . trimEnd ( ) . split ( '\n' ) . at ( - 1 ) ! ) ;
37
+ }
32
38
} ) ;
33
39
} ) ;
34
40
}
You can’t perform that action at this time.
0 commit comments