diff options
Diffstat (limited to 'src/nix/flake.cc')
-rw-r--r-- | src/nix/flake.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc index cd4ee5921..a6c6b947f 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -440,8 +440,8 @@ struct CmdFlakeCheck : FlakeCommand if (attr->name == state->symbols.create("path")) { PathSet context; auto path = state->coerceToPath(attr->pos, *attr->value, context, ""); - if (!store->isInStore(path)) - throw Error("template '%s' has a bad 'path' attribute"); + if (!path.pathExists()) + throw Error("template '%s' refers to a non-existent path '%s'", attrPath, path); // TODO: recursively check the flake in 'path'. } } else |