mirror of https://github.com/sbt/sbt.git
Actually pass Java options to bootstraps
This commit is contained in:
parent
e37fb65fba
commit
d0e9e41ca9
|
|
@ -200,7 +200,7 @@ object Bootstrap extends CaseApp[BootstrapOptions] {
|
|||
// escaping of javaOpt possibly a bit loose :-|
|
||||
val shellPreamble = Seq(
|
||||
"#!/usr/bin/env sh",
|
||||
"exec java -jar " + options.options.javaOpt.map(s => "'" + s.replace("'", "\\'") + "'").mkString(" ") + " \"$0\" \"$@\""
|
||||
"exec java " + options.options.javaOpt.map(s => "'" + s.replace("'", "\\'") + "'").mkString(" ") + " -jar \"$0\" \"$@\""
|
||||
).mkString("", "\n", "\n")
|
||||
|
||||
try Files.write(output0.toPath, shellPreamble.getBytes(UTF_8) ++ buffer.toByteArray)
|
||||
|
|
|
|||
|
|
@ -135,6 +135,15 @@ testBootstrap() {
|
|||
echo "Error: unexpected output from bootstrapped echo command (generated by proguarded launcher)." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# run via the launcher rather than via the sbt-pack scripts, because the latter interprets -Dfoo=baz itself
|
||||
# rather than passing it to coursier since https://github.com/xerial/sbt-pack/pull/118
|
||||
./coursier-test bootstrap -o cs-props -J -Dfoo=baz io.get-coursier:props:1.0.2
|
||||
local OUT="$(./cs-props foo)"
|
||||
if [ "$OUT" != baz ]; then
|
||||
echo -e "Error: unexpected output from bootstrapped props command.\n$OUT" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue