Skip to content
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

nix shell does not insert PATH items in command line order #7905

Closed
roberth opened this issue Feb 24, 2023 · 1 comment · Fixed by #9648
Closed

nix shell does not insert PATH items in command line order #7905

roberth opened this issue Feb 24, 2023 · 1 comment · Fixed by #9648
Assignees
Labels
bug new-cli Relating to the "nix" command

Comments

@roberth
Copy link
Member

roberth commented Feb 24, 2023

Describe the bug

nix shell does not insert PATH items in command line order. Instead, it traverses them left to right prepending each, resulting in a reversal.

Steps To Reproduce

Apologies for the whacky example.

  1. Use my nixpkgs branch with a customized hello package. (will link; doesn't matter much)
  2. nix shell .#hello .#salve-mundi
  3. hello

It invokes the latter package, printing SALVE MUNDI

Expected behavior

Prepend them to the existing PATH but in the same order as specified on the command line.

nix-env --version output

master 92611e6

Additional context

Priorities

Add 👍 to issues you find important.

@roberth roberth added bug new-cli Relating to the "nix" command labels Feb 24, 2023
@thufschmitt thufschmitt added this to the CLI Stabilisation milestone Sep 4, 2023
@cole-h
Copy link
Member

cole-h commented Dec 20, 2023

I took a stab at this in #9648.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug new-cli Relating to the "nix" command
Projects
Status: Done
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants