kscripting / kscript

Scripting enhancements for Kotlin
MIT License
2.07k stars 124 forks source link

Does not support spaces in KOTLIN_HOME variable. #414

Open c8hallett opened 8 months ago

c8hallett commented 8 months ago

If one wanted to use the kotlin package with Android Studio, the KOTLIN_HOME variable would look something similar to: export KOTLIN_HOME="/Applications/Android\ Studio.app/Contents/plugins/Kotlin/kotlinc"

However, the execution of the script fails at the presence of the space (even though it's properly escaped).

% echo $KOTLIN_HOME           
/Applications/Android\ Studio.app/Contents/plugins/Kotlin/kotlinc
% kscript createSubModules.kts
bash: /Applications/Android/: No such file or directory
[kscript] [ERROR] Execution of scriplet failed:
[kscript] [ERROR] Command     : 'bash -c /Applications/Android/ Studio.app/Contents/plugins/Kotlin/kotlinc/bin/kotlin  -classpath '[REDACTED]' Main_CreateSubModules '
[kscript] [ERROR] Exit Code   : 127   
[kscript] [ERROR]