Improve error message when a directory is not a flake

So you now get

  $ nix build
  error: path '.' is not a flake (because it does not reference a Git repository)

rather than

  $ nix build
  error: unsupported argument '.'
This commit is contained in:
Eelco Dolstra
2019-09-02 17:35:35 +02:00
parent 5ec2a1ed82
commit 61fdb16aac
3 changed files with 39 additions and 20 deletions
+1
View File
@@ -187,6 +187,7 @@ struct FlakeRef
std::ostream & operator << (std::ostream & str, const FlakeRef & flakeRef);
MakeError(BadFlakeRef, Error);
MakeError(MissingFlake, BadFlakeRef);
std::optional<FlakeRef> parseFlakeRef(
const std::string & uri, bool allowRelative = false);