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
Evaluating an attribute set like {name = "foo"; type = "derivation"; drvPath = "";} in the REPL crashes, rather than printing an error and giving back the REPL prompt.
Steps To Reproduce
$ nix repl
Welcome to Nix 2.8.1. Type :? for help.
nix-repl> {name = "foo"; type = "derivation"; drvPath = "";}
nix: src/libutil/util.cc:109: nix::Path nix::canonPath(nix::PathView, bool): Assertion `path != ""' failed.
[1] 921322 IOT instruction (core dumped) nix repl
$
As you can see, the REPL session is killed, and the error message is not user-friendly.
Expected behavior
A user-friendly error like error: expression contains an empty 'drvPath' attribute., or even no error, because there is nothing wrong with this attribute set (until one tries to build it, of course).
nix-env --version output nix-env (Nix) 2.8.1 but @rapenne-s confirmed it also happens on 2.11.
Additional context
FWIW the REPL behaves as expected when setting outPath = "";:
$ nix repl
Welcome to Nix 2.8.1. Type :? for help.
nix-repl> {name = "foo"; type = "derivation"; outPath = "";}
«derivation ???»
nix-repl>
The text was updated successfully, but these errors were encountered:
Describe the bug
Evaluating an attribute set like
{name = "foo"; type = "derivation"; drvPath = "";}
in the REPL crashes, rather than printing an error and giving back the REPL prompt.Steps To Reproduce
As you can see, the REPL session is killed, and the error message is not user-friendly.
Expected behavior
A user-friendly error like
error: expression contains an empty 'drvPath' attribute.
, or even no error, because there is nothing wrong with this attribute set (until one tries to build it, of course).nix-env --version
outputnix-env (Nix) 2.8.1
but @rapenne-s confirmed it also happens on2.11
.Additional context
FWIW the REPL behaves as expected when setting
outPath = "";
:The text was updated successfully, but these errors were encountered: