1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

* Strip off the `.nix' suffix from the attribute name for files in

~/.nix-defexpr,  otherwise the attribute cannot be selected with the
  `-A' option.  Useful if you want to stick a Nix expression directly
  in ~/.nix-defexpr.
This commit is contained in:
Eelco Dolstra 2008-08-25 13:31:57 +00:00
parent cc826dc03e
commit b428adc267
5 changed files with 27 additions and 6 deletions

View file

@ -1046,6 +1046,12 @@ bool string2Int(const string & s, long long & n)
}
bool hasSuffix(const string & s, const string & suffix)
{
return s.size() >= suffix.size() && string(s, s.size() - suffix.size()) == suffix;
}
void ignoreException()
{
try {