nix dev-shell --profile: Support relative path

This commit is contained in:
Eelco Dolstra 2019-09-02 15:59:19 +02:00
parent a49b6761a5
commit 5ec2a1ed82
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -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)