mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 14:36:16 +02:00
Fix reading the lockfile of a flake in a subdirectory
This commit is contained in:
parent
9169046e64
commit
7adb10d29b
1 changed files with 5 additions and 2 deletions
|
@ -484,7 +484,10 @@ ResolvedFlake resolveFlake(EvalState & state, const FlakeRef & topRef, HandleLoc
|
||||||
|
|
||||||
if (!recreateLockFile(handleLockFile)) {
|
if (!recreateLockFile(handleLockFile)) {
|
||||||
// If recreateLockFile, start with an empty lockfile
|
// If recreateLockFile, start with an empty lockfile
|
||||||
oldLockFile = readLockFile(flake.sourceInfo.storePath + "/flake.lock"); // FIXME: symlink attack
|
// FIXME: symlink attack
|
||||||
|
oldLockFile = readLockFile(
|
||||||
|
state.store->toRealPath(flake.sourceInfo.storePath)
|
||||||
|
+ "/" + flake.sourceInfo.resolvedRef.subdir + "/flake.lock");
|
||||||
}
|
}
|
||||||
|
|
||||||
LockFile lockFile(oldLockFile);
|
LockFile lockFile(oldLockFile);
|
||||||
|
|
Loading…
Reference in a new issue