Cross Platform solution to run Tasks in interpreters #7636
IIIMADDINIII
started this conversation in
Ideas
Replies: 1 comment
-
|
this gets a +1 for me. I also have a project that needs to be built on both windows, macos, and linux. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I like to use js or py files as Tasks because i can run them on basically any platform.
This has the advantage of not needing to create multiple redundant shell scripts for multiple platforms.
The solution of a shebang line does not work for me, because i develop on Windows.
I want to propose a new task property "run_with" which specifies the command line to run the Task file or run String.
To run a script with python you would put ``#MISE run_with="python {{file}}"
in a Task File. We could also supportrun_with="python -c {{code}}"` for the usage in toml taks.Using the placeholder is useful to be able to supply arguments to the interpreter.
This would also mean, that the task filtering would need to be reworked on windows (Currently only files with extensions listed in `windows_executable_extensions` are considered for tasks).
My current workaround on windows is to miss use the
shelltask property anduse_file_shell_for_executable_tasks = trueand adding js extensions towindows_executable_extensionssetting. Then i am able to use the following line in a js file to run it inside deno.//MISE shell="deno run -A --node-modules-dir=none --no-lock"Beta Was this translation helpful? Give feedback.
All reactions