twibiral / obsidian-execute-code

Obsidian Plugin to execute code in a note.
MIT License
994 stars 61 forks source link

[BUG] Kotlin `error: unknown option: -script` #349

Open ChobobDev opened 2 months ago

ChobobDev commented 2 months ago

Describe the bug Hi I am not sure this is a bug or not but I am trying to use kotlin language but when I try to run the code I am meeting the following error message.

error: unknown option: -script

Software Version I am using MacOS( apple silicon) and I have installed Kotlin through brew install kotlin and the current version of my kotlin is 1.9.24

I have set my kotlin path as /opt/homebrew/bin/kotlin

Expected behavior I hope the Kotlinc to compile my script

Screenshots If applicable, add screenshots to help explain your problem.

image

Thank you and really do hope i can use this for my studies.

twibiral commented 1 month ago

Hi! When you open the plugin options and navigate to Kotlin, you should see the field "Kotlin arguments". By default, this field contains the entry -script. I don't use Kotlin and I don't know (or remember) why the argument was added, but you can change this setting however you like.

Please tell me if you know what the argument means or when it should be set and when not.