Skip to content

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

@roberth

Description

@roberth

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.

Metadata

Metadata

Assignees

Labels

bugnew-cliRelating to the "nix" command

Type

No type

Projects

Status

Done

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions