-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
buglanguageThe Nix expression language; parser, interpreter, primops, evaluation, etcThe Nix expression language; parser, interpreter, primops, evaluation, etc
Description
Describe the bug
the recommended way to convert a string to a path is by concatenating it with another path.
however, if you concatenate multiple strings together, you may not get the result you expect
Steps To Reproduce
$ nix replnix-repl> /bin + "/" + "sh"/binsh
Expected behavior
the repl should print /bin/sh, or at the very least print a warning about the trailing / being ignored.
nix-env --version output
nix-env (Nix) 2.18.1
Additional context
the workaround it to parenthesize the rhs: /bin + ("/" + "sh")
i ran into this when trying to implement something similar to the nixpkgs by-name system.
Priorities
Add 👍 to issues you find important.
Metadata
Metadata
Assignees
Labels
buglanguageThe Nix expression language; parser, interpreter, primops, evaluation, etcThe Nix expression language; parser, interpreter, primops, evaluation, etc