Skip to content

Commit f62f058

Browse files
committed
added cygwin workaround to launcher
1 parent 6d65f45 commit f62f058

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

kscript

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33

44
# version tag for backward compatibility with kscript v1.x
5-
KSCRIPT_VERSION=2.0.0
5+
KSCRIPT_VERSION=2.0.1
66

7-
exec $(kotlin -classpath $(dirname $0)/kscript.jar kscript.app.KscriptKt "$@")
7+
8+
## resolve application jar path from script location and convert to windows path when using cygwin
9+
jarPath=$(dirname $0)/kscript.jar
10+
if [[ $(uname) == CYGWIN* ]]; then jarPath=$(cygpath -w ${jarPath}); fi
11+
12+
## run it using command substitution to have just the user process once kscript is done
13+
exec $(kotlin -classpath ${jarPath} kscript.app.KscriptKt "$@")

0 commit comments

Comments
 (0)