1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-10 12:36:01 +01:00

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:33:07 +02:00
parent 5ec2a1ed82
commit 61fdb16aac
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 39 additions and 20 deletions

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);