You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@thufschmitt surely we can print a warning of some sort when just "/" is appended to a path?
Right, that is something that would make a lot of sense.
It's kinda blocked on #10281 atm, but if you feel like helping there, that would be immensely appreciated.
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 repl
nix-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
outputnix-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.
The text was updated successfully, but these errors were encountered: