Skip to content

Commit c58fbfe

Browse files
committed
start interactive repl with -i
1 parent 9d92efa commit c58fbfe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kscript

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ kotlin_opts=$(grep -F "//KOTLIN_OPTS" ${scriptFile} | head -n1 | cut -f2- -d' ')
231231

232232
## Optionally enter interactive mode
233233
if [ "$is_interactive" = true ]; then
234-
echo "To create a shell with script dependencies run:"
235-
echo "kotlinc ${kotlin_opts} -classpath '$(resdeps.kts ${dependencies})'"
236-
exit 0
234+
echo "Creating REPL from ${scriptFile}" >&2
235+
echo "kotlinc ${kotlin_opts} -classpath '${classpath}'" >&2
236+
exec kotlinc ${kotlin_opts} -classpath "${classpath}"
237237
fi
238238

239239
scriptCheckSum=$(kscript_md5 ${scriptFile})

0 commit comments

Comments
 (0)