diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-08-31T22·19+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-08-31T22·19+0200 |
commit | 475a0a54a9c28c311f0c05d129bb165e7c215efb (patch) | |
tree | a373d4add698a11ffd33cb35ca4cdec1a5760bb7 /src | |
parent | b7409c57544997e6c31a05b5ca024e752cb1a35d (diff) |
fetchGit/fetchMercurial: Don't absolutize paths
This is already done by coerceToString(), provided that the argument is a path (e.g. 'fetchGit ./bla'). It fixes the handling of URLs like git@github.com:owner/repo.git. It breaks 'fetchGit "./bla"', but that was never intended to work anyway and is inconsistent with other builtin functions (e.g. 'readFile "./bla"' fails).
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/primops/fetchGit.cc | 2 | ||||
-rw-r--r-- | src/libexpr/primops/fetchMercurial.cc | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/src/libexpr/primops/fetchGit.cc b/src/libexpr/primops/fetchGit.cc index 7aa98e0bfab3..0c6539959bf6 100644 --- a/src/libexpr/primops/fetchGit.cc +++ b/src/libexpr/primops/fetchGit.cc @@ -219,8 +219,6 @@ static void prim_fetchGit(EvalState & state, const Pos & pos, Value * * args, Va } else url = state.coerceToString(pos, *args[0], context, false, false); - if (!isUri(url)) url = absPath(url); - // FIXME: git externals probably can be used to bypass the URI // whitelist. Ah well. state.checkURI(url); diff --git a/src/libexpr/primops/fetchMercurial.cc b/src/libexpr/primops/fetchMercurial.cc index 9d35f6d0d6d7..97cda2458c9b 100644 --- a/src/libexpr/primops/fetchMercurial.cc +++ b/src/libexpr/primops/fetchMercurial.cc @@ -184,8 +184,6 @@ static void prim_fetchMercurial(EvalState & state, const Pos & pos, Value * * ar } else url = state.coerceToString(pos, *args[0], context, false, false); - if (!isUri(url)) url = absPath(url); - // FIXME: git externals probably can be used to bypass the URI // whitelist. Ah well. state.checkURI(url); |