File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/main/kotlin/kscript/app Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,4 +25,4 @@ jarPath=$(dirname $abs_kscript_path)/kscript.jar
2525if [[ $( uname) == CYGWIN* ]]; then jarPath=$( cygpath -w ${jarPath} ) ; fi
2626
2727# # run it using command substitution to have just the user process once kscript is done
28- exec $( kotlin -classpath ${jarPath} kscript.app.KscriptKt " $@ " )
28+ eval " exec $( kotlin -classpath ${jarPath} kscript.app.KscriptKt " $@ " ) "
Original file line number Diff line number Diff line change @@ -237,8 +237,8 @@ fun main(args: Array<String>) {
237237 }
238238
239239
240- // print the final command to be run by exec
241- val joinedUserArgs = userArgs.joinToString(" " )
240+ // print the final command to be run by eval+ exec
241+ val joinedUserArgs = userArgs.map { " \" ${it.replace( " \" " , " \\\" " )} \" " }. joinToString(" " )
242242
243243 // if requested try to package the into a standalone binary
244244 if (docopt.getBoolean(" package" )) {
You can’t perform that action at this time.
0 commit comments