aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/indirect.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-05 14:51:41 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-05 14:51:41 +0000
commit92ad550e96935d21fb24938305f5a3a7238e540e (patch)
tree53e564d25ca0699619d38e95bf6e76bca6556dfd /src/libfetchers/indirect.cc
parentb9ebe373bbab6f19ee650ef9769ad76c32b7244d (diff)
parente561a13a5863f25c81e8abc9d235a12925fd454e (diff)
Merge remote-tracking branch 'obsidian/misc-ca' into derivation-primop-floating-output
Diffstat (limited to 'src/libfetchers/indirect.cc')
-rw-r--r--src/libfetchers/indirect.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libfetchers/indirect.cc b/src/libfetchers/indirect.cc
index 91dc83740..b981d4d8e 100644
--- a/src/libfetchers/indirect.cc
+++ b/src/libfetchers/indirect.cc
@@ -18,7 +18,7 @@ struct IndirectInputScheme : InputScheme
if (path.size() == 1) {
} else if (path.size() == 2) {
if (std::regex_match(path[1], revRegex))
- rev = Hash(path[1], htSHA1);
+ rev = Hash::parseAny(path[1], htSHA1);
else if (std::regex_match(path[1], refRegex))
ref = path[1];
else
@@ -29,7 +29,7 @@ struct IndirectInputScheme : InputScheme
ref = path[1];
if (!std::regex_match(path[2], revRegex))
throw BadURL("in flake URL '%s', '%s' is not a commit hash", url.url, path[2]);
- rev = Hash(path[2], htSHA1);
+ rev = Hash::parseAny(path[2], htSHA1);
} else
throw BadURL("GitHub URL '%s' is invalid", url.url);