aboutsummaryrefslogtreecommitdiff
path: root/src/nix/profile.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-02-17 17:32:10 +0100
committerEelco Dolstra <edolstra@gmail.com>2021-02-17 17:32:10 +0100
commit13897afbe6cf7ef8013c0c94109696bb7b13d0c0 (patch)
tree62274775ca7fee6dfa1dcddce197c0cf71312006 /src/nix/profile.cc
parentf33878b6562c746d5865a86e64f02c75feaf5b3e (diff)
Throw an error if --arg / --argstr is used with a flake
Fixes #3949.
Diffstat (limited to 'src/nix/profile.cc')
-rw-r--r--src/nix/profile.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nix/profile.cc b/src/nix/profile.cc
index 827f8be5a..4d275f577 100644
--- a/src/nix/profile.cc
+++ b/src/nix/profile.cc
@@ -399,7 +399,13 @@ struct CmdProfileUpgrade : virtual SourceExprCommand, MixDefaultProfile, MixProf
Activity act(*logger, lvlChatty, actUnknown,
fmt("checking '%s' for updates", element.source->attrPath));
- InstallableFlake installable(getEvalState(), FlakeRef(element.source->originalRef), {element.source->attrPath}, {}, lockFlags);
+ InstallableFlake installable(
+ this,
+ getEvalState(),
+ FlakeRef(element.source->originalRef),
+ {element.source->attrPath},
+ {},
+ lockFlags);
auto [attrPath, resolvedRef, drv] = installable.toDerivation();