forked from lix-project/lix
Merge branch 'GuillaumeDesforges/issue6192' of https://github.com/GuillaumeDesforges/nix
This commit is contained in:
commit
fa614fac7f
1 changed files with 8 additions and 2 deletions
|
@ -706,9 +706,15 @@ struct CmdFlakeInitCommon : virtual Args, EvalCommand
|
|||
|
||||
auto [cursor, attrPath] = installable.getCursor(*evalState);
|
||||
|
||||
auto templateDir = cursor->getAttr("path")->getString();
|
||||
auto templateDirAttr = cursor->getAttr("path");
|
||||
auto templateDir = templateDirAttr->getString();
|
||||
|
||||
assert(store->isInStore(templateDir));
|
||||
if (!store->isInStore(templateDir)) {
|
||||
throw TypeError(
|
||||
std::string("'%s' was not found in the Nix store\n") +
|
||||
"If you've set '%s' to a string, try using a path instead.",
|
||||
templateDir, templateDirAttr->getAttrPathStr());
|
||||
}
|
||||
|
||||
std::vector<Path> files;
|
||||
|
||||
|
|
Loading…
Reference in a new issue