prefix-dev / pixi

Package management made easy
https://pixi.sh
BSD 3-Clause "New" or "Revised" License
2.41k stars 137 forks source link

Quoting not passed to subcommand #1492

Closed jonashaag closed 1 week ago

jonashaag commented 1 month ago

Checks

Reproducible example

❯ pixi run python -c 'import sys; print(sys.argv)' '*foo*'
glob: no matches found '.../*foo*'

Issue description

Quoting is not passed to subcommand

Expected behavior

Quoting should be passed to subcommand

ruben-arts commented 1 month ago

I'm not sure how pixi should deal with that as it is first parsed by the shell you are running in.

Normally you can escape this by using \ in front of chars you don't want your shell to run.

jonashaag commented 1 month ago

Since Pixi uses Deno's task shell I tried it in Deno:

❯ deno eval 'console.log(Deno.args)' xxx '*foo*'
[ "xxx", "*foo*" ]

Also in Bun:

❯ bun --print 'process.argv' xxx '*foo*'
[ "/opt/homebrew/Cellar/bun/1.1.12/bin/bun", "/private/tmp/[eval]", "*foo*" ]

IMO the arguments passed after the task name should not be evaluated in the Deno shell, but passed literally

jonashaag commented 2 weeks ago

bump!