Fixed compile errors
This commit is contained in:
parent
5d6e8c008b
commit
e0d4aa75fc
|
@ -370,7 +370,7 @@ ResolvedFlake resolveFlake(EvalState & state, const FlakeRef & topRef,
|
||||||
LockFile lockFile;
|
LockFile lockFile;
|
||||||
|
|
||||||
if (isTopFlake)
|
if (isTopFlake)
|
||||||
lockFile = readLockFile(flake.sourceInfo.storePath + "/" + flake.resolvedRef.subdir + "/flake.lock"); // FIXME: symlink attack
|
lockFile = readLockFile(flake.sourceInfo.storePath + "/" + flake.ref.subdir + "/flake.lock"); // FIXME: symlink attack
|
||||||
|
|
||||||
ResolvedFlake deps(flake);
|
ResolvedFlake deps(flake);
|
||||||
|
|
||||||
|
@ -414,13 +414,13 @@ void updateLockFile(EvalState & state, const FlakeUri & flakeUri)
|
||||||
{
|
{
|
||||||
// FIXME: We are writing the lockfile to the store here! Very bad practice!
|
// FIXME: We are writing the lockfile to the store here! Very bad practice!
|
||||||
FlakeRef flakeRef = FlakeRef(flakeUri);
|
FlakeRef flakeRef = FlakeRef(flakeUri);
|
||||||
if (auto refData = std::get_if<IsPath>(flakeRef)) {
|
if (auto refData = std::get_if<FlakeRef::IsPath>(&flakeRef.data)) {
|
||||||
auto lockFile = makeLockFile(state, flakeRef);
|
auto lockFile = makeLockFile(state, flakeRef);
|
||||||
writeLockFile(lockFile, refData->path + "/" + flakeRef.subdir + "/flake.lock");
|
writeLockFile(lockFile, refData->path + "/" + flakeRef.subdir + "/flake.lock");
|
||||||
|
|
||||||
// Hack: Make sure that flake.lock is visible to Git. Otherwise,
|
// Hack: Make sure that flake.lock is visible to Git. Otherwise,
|
||||||
// exportGit will fail to copy it to the Nix store.
|
// exportGit will fail to copy it to the Nix store.
|
||||||
runProgram("git", true, { "-C", refData->path, "add", flakeRef.subDir + "/flake.lock" });
|
runProgram("git", true, { "-C", refData->path, "add", flakeRef.subdir + "/flake.lock" });
|
||||||
} else
|
} else
|
||||||
throw Error("flakeUri %s can't be updated because it is not a path", flakeUri);
|
throw Error("flakeUri %s can't be updated because it is not a path", flakeUri);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue