diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-09-02 15:59:19 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-09-02 15:59:19 +0200 |
commit | 5ec2a1ed82d485429aaf6fbad55fd6c1320b2d8c (patch) | |
tree | 5118d8adabfc866b15549d8af4895a5b94aea042 /src/nix/command.cc | |
parent | a49b6761a54984669bc622edfe3e693244868425 (diff) |
nix dev-shell --profile: Support relative path
Diffstat (limited to 'src/nix/command.cc')
-rw-r--r-- | src/nix/command.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nix/command.cc b/src/nix/command.cc index 8191cb831..9cca443dc 100644 --- a/src/nix/command.cc +++ b/src/nix/command.cc @@ -96,10 +96,11 @@ void MixProfile::updateProfile(const Path & storePath) if (!profile) return; auto store = getStore().dynamic_pointer_cast<LocalFSStore>(); if (!store) throw Error("'--profile' is not supported for this Nix store"); - switchLink(*profile, + auto profile2 = absPath(*profile); + switchLink(profile2, createGeneration( ref<LocalFSStore>(store), - *profile, storePath)); + profile2, storePath)); } void MixProfile::updateProfile(const Buildables & buildables) |