@@ -554,12 +554,12 @@ LockedFlake lockFlake(
554554
555555 /* Get the input flake, resolve 'path:./...'
556556 flakerefs relative to the parent flake. */
557- auto getInputFlake = [&]()
557+ auto getInputFlake = [&](const FlakeRef & ref )
558558 {
559559 if (auto resolvedPath = resolveRelativePath ()) {
560- return readFlake (state, *input. ref , *input. ref , *input. ref , *resolvedPath, inputPath);
560+ return readFlake (state, ref, ref, ref, *resolvedPath, inputPath);
561561 } else {
562- return getFlake (state, *input. ref , useRegistries, flakeCache, inputPath);
562+ return getFlake (state, ref, useRegistries, flakeCache, inputPath);
563563 }
564564 };
565565
@@ -640,7 +640,7 @@ LockedFlake lockFlake(
640640 }
641641
642642 if (mustRefetch) {
643- auto inputFlake = getInputFlake ();
643+ auto inputFlake = getInputFlake (oldLock-> lockedRef );
644644 nodePaths.emplace (childNode, inputFlake.path .parent ());
645645 computeLocks (inputFlake.inputs , childNode, inputPath, oldLock, followsPrefix,
646646 inputFlake.path , false );
@@ -668,7 +668,7 @@ LockedFlake lockFlake(
668668 auto ref = (input2.ref && explicitCliOverrides.contains (inputPath)) ? *input2.ref : *input.ref ;
669669
670670 if (input.isFlake ) {
671- auto inputFlake = getInputFlake ();
671+ auto inputFlake = getInputFlake (*input. ref );
672672
673673 auto childNode = make_ref<LockedNode>(
674674 inputFlake.lockedRef ,
0 commit comments