Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

pixi run fails when inner command contains ~ #2972

Open
2 tasks done
liskajiri opened this issue Jan 21, 2025 · 2 comments
Open
2 tasks done

pixi run fails when inner command contains ~ #2972

liskajiri opened this issue Jan 21, 2025 · 2 comments
Labels
area:tasks Related to pixi tasks 🐞 bug Something isn't working

Comments

@liskajiri
Copy link

Checks

  • I have checked that this issue has not already been reported.

  • 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.

@Hofer-Julian Hofer-Julian added the area:tasks Related to pixi tasks label Jan 21, 2025
@nichmor
Copy link
Contributor

nichmor commented Jan 21, 2025

thanks for reporting this! I will take a look

@nichmor nichmor added the 🐞 bug Something isn't working label Jan 21, 2025
@Hofer-Julian
Copy link
Contributor

Related PR: denoland/deno_task_shell#128

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area:tasks Related to pixi tasks 🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants