-
Notifications
You must be signed in to change notification settings - Fork 964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Custom shell" (kotlin) should allow custom file name extension (.main.kts
)
#813
Comments
.main.kts
)
So I've tried the most naive way of fixing this by adding the values to the map as shown in https://github.com/fwilhe2/runner/commit/66b90716c5ea992afcb0ed6995523a89d3f6d18d and used that version of the runner self hosed which shows that it works in principle: I doubt this would be an acceptable solution, but I'm not sure what could be an acceptable solution. I think there would need to be another optional field something like Any comments or suggestions/ guidance on the way to a PR would be welcome. |
For reference: I've also created an issue for Kotlin https://youtrack.jetbrains.com/issue/KT-43534 |
Update: Kotlin
Still, it might be more elegant if this was possible:
|
Related to actions/runner-images#3687 |
Hi @fwilhe2,
Thanks for the contribution and sorry once again. |
No worries, I was not working on this. Looking forward to have this available 💯 |
Describe the enhancement
Actions allows to define a custom shell in worflow runs.
Kotlin has support for scripting.
I've tried to make use of Kotlin for runninng a script in Actions.
The issue is that kotlin expects a file name ending in
.main.kts
, but the runner creates a file without extensions for "shells" that are not hardcoded inrunner/src/Runner.Worker/Handlers/ScriptHandlerHelpers.cs
Line 38 in a2e3217
File name construction:
runner/src/Runner.Worker/Handlers/ScriptHandler.cs
Line 233 in a2e3217
I would need some way to provide a map of
kotlin
to.main.kts
toScriptHandlerHelpers.GetScriptFileExtension()
Code Snippet
Consider this example workflow:
I would expect to be able to run the given script in kotlin (the cli compiler is installed on the runner via
fwilhe2/setup-kotlin
).Additional information
Result of the given workflow script:
This is because kotlin requires the
main.kts
suffix to know this should be run as a script.Compare to running the script locally with the right or the wrong filename
Did I overlook something? Is this already possible? If not, I'd be glad if some option to make this would be provided, as it would make the "custom shell" feature much more interesting.
Thanks!
The text was updated successfully, but these errors were encountered: