Skip to content

Conversation

@royreznik
Copy link

I have encounter an annoying behaviour when trying to use moon

When i added the following command to my target:

command: docker run --rm -e HOME="/tmp" -u "$(id -u):$(id -g)"  ...

It didn't automaticly changed it into shell, like moon does when it sees a '*', as for if task.args.iter().any(|arg| is_glob_like(arg))

So i thought it will be a good idea to just set it into shell in those cases

@milesj
Copy link
Collaborator

milesj commented Sep 18, 2025

@royreznik script instead of command was more intended for this kind of use case.

@royreznik
Copy link
Author

@royreznik script instead of command was more intended for this kind of use case.

Thanks for the reply
This just to make it consistent, as we already have it for globs, lets do it for subcommands

@milesj
Copy link
Collaborator

milesj commented Sep 21, 2025

The problem with command is that it is constantly string split and re-joined (script is not), so there's no guarantee that the command will actually be pieced back together correctly again. This will probably not be allowed in v2.

So I'm not sure I want to fully support shell syntax in command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants