Skip to content

Commit 38663fb

Browse files
committed
Pass dir in extraAttrs when overriding the registry
This is handled similarly in the handler for `--override-flake` in `MixEvalArgs`.
1 parent ed6ef7c commit 38663fb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/libcmd/installables.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,16 @@ MixFlakeOptions::MixFlakeOptions()
178178
for (auto & [inputName, input] : flake.lockFile.root->inputs) {
179179
auto input2 = flake.lockFile.findInput({inputName}); // resolve 'follows' nodes
180180
if (auto input3 = std::dynamic_pointer_cast<const flake::LockedNode>(input2)) {
181+
fetchers::Attrs extraAttrs;
182+
183+
if (!input3->lockedRef.subdir.empty()) {
184+
extraAttrs["dir"] = input3->lockedRef.subdir;
185+
}
186+
181187
overrideRegistry(
182188
fetchers::Input::fromAttrs(fetchSettings, {{"type", "indirect"}, {"id", inputName}}),
183189
input3->lockedRef.input,
184-
{});
190+
extraAttrs);
185191
}
186192
}
187193
}},

0 commit comments

Comments
 (0)