-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
[feature] Support nested execution in platform: system
commands
#889
Comments
Arg parsing comes from a third-party library, so I don't have a lot of control of it right now. You can probably try the array form which bypasses arg parsing: test:
command:
- node
- --title
- $projectAlias:test
- ../../node_modules/ava/entrypoints/cli.mjs
- $(echo $MOON_PROJECT_ROOT)
inputs:
- src
- test
platform: system |
Good call. Gave that a shot and looks like the parser is making it a string, which doesn't allow the nested execution. |
Should this be considered a bug? I saw this example in the documentation: tasks:
native:
command: 'echo $SHELL'
options:
shell: true which I think implies that it will print the name of the shell used and not just the string Can work around with: tasks:
native:
command: bash -c "echo $SHELL"
options:
shell: true Edit: apparently I'm talking about a different issue (shell variables vs nested execution), but both seem like a bug (bad UX) since shell features randomly don't work. I think users expect to be able to copy-paste their shell script file contents under |
This PR (#928) will fix the quoting, so |
Is your feature request related to a problem? Please describe.
While trying to get around #888 without creating a separate bash script, I attempted to use the
MOON_PROJECT_ROOT
environment variable in a command withplatform: system
.The result was:
I also tried backticks with a similar result:
It looks like the argument parsing needs a bit more massaging to make it bash-compatible yet, but that's to be expected.
Describe the solution you'd like
I'd like to use backticks or the
$()
blocks for nested execution. This likely requires closer integration with the shell and probably not something that moon is setup for at the moment, but I'd still like to get it down as a want and nice-to-have.Describe alternatives you've considered
Using a separate bash script works, but that's a detriment to DX.
Additional context
The text was updated successfully, but these errors were encountered: