Use exec to launch when not in cygwin

This allows, for example, capturing the correct PID when launching sbt
from within a bash script. The original change from
1a07150560 was to address an issue
specific to cygwin.
This commit is contained in:
Edward Samson 2019-11-20 13:57:33 +08:00
parent 031021cea0
commit a362c964de
1 changed files with 7 additions and 3 deletions

View File

@ -118,9 +118,13 @@ execRunner () {
echo ""
}
# This used to be exec, but we loose the ability to re-hook stty then
# for cygwin... Maybe we should flag the feature here...
"$@"
if [[ "$CYGWIN_FLAG" == "true" ]]; then
# In cygwin we loose the ability to re-hook stty if exec is used
# https://github.com/sbt/sbt-launcher-package/issues/53
"$@"
else
exec "$@"
fi
}
addJava () {