`pixi run` fails when inner command contains `~`
Checks
-
[x] I have checked that this issue has not already been reported.
-
[x] I have confirmed this bug exists on the latest version of pixi, using
pixi --version.
Reproducible example
[project]
channels = ["https://prefix.dev/conda-forge"]
name = "."
platforms = ["linux-64"]
[tasks]
download_cifar = "curl -o cifar-10-python.tar.gz https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz"
Outputs:
❯ pixi run download_cifar
✨ Pixi task (download_cifar): curl -o cifar-10-python.tar.gz https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz
Error:
× The task failed to parse. task: 'curl -o cifar-10-python.tar.gz https://www.cs.toronto.edu/~kriz/
│ cifar-10-python.tar.gz ' error: 'Unexpected character.
│ ~kriz/cifar-10-python.tar.gz
│ ~'
Issue description
A task will fail when it contains the ~ character.
This is probably the same error as #727
The task works when the command is escaped (like in the referenced issue).
[project]
channels = ["https://prefix.dev/conda-forge"]
name = "."
platforms = ["linux-64"]
[tasks]
download_cifar = "curl -o cifar-10-python.tar.gz \"https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz\""
run on version pixi 0.40.2
Expected behavior
The task should work without escaping, or only escaping the tilde.
thanks for reporting this! I will take a look
Related PR: https://github.com/denoland/deno_task_shell/pull/128
Not reproducible in latest pixi version. Likely fixed in the task shell.