nix
nix copied to clipboard
__appendContext crashed repl
Describe the bug
$ nix repl
Welcome to Nix 2.7.0pre20220201_73d5f38. Type :? for help.
nix-repl> __appendContext "Hello" { "" = null; }
nix: src/libutil/util.cc:112: nix::Path nix::canonPath(const Path&, bool): Assertion `path != ""' failed.
[1] 1292835 abort (core dumped) /run/current-system/sw/bin/nix --extra-experimental-features nix-command
$
Expected behavior
Not crashing, the usual error-message instead.
Additional context
-
__appendContextand__getContextcould have some more documentation. - There is no
unsafeGetContext: https://github.com/NixOS/nix/blob/6d7844695bf14c1fc68f051df0b98db442863fc9/src/libexpr/primops/context.cc#L130-L134