mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 13:10:33 +02:00
guix download: Support retrieving local file without the URI scheme.
* guix/scripts/download.scm (guix-download): Treat the URL argument as a local file path when it fails on 'string->uri'. Call 'fetch' with the processed 'uri' instead of the original URL argument. * tests/guix-download.sh: Adjust accordingly.
This commit is contained in:
@@ -29,12 +29,15 @@ then false; else true; fi
|
||||
if guix download unknown://some/where;
|
||||
then false; else true; fi
|
||||
|
||||
if guix download not/a/uri;
|
||||
if guix download /does-not-exist
|
||||
then false; else true; fi
|
||||
|
||||
# This one should succeed.
|
||||
guix download "file://$abs_top_srcdir/README"
|
||||
|
||||
# And this one, without the URI scheme.
|
||||
guix download "$abs_top_srcdir/README"
|
||||
|
||||
# This one too, even if it cannot talk to the daemon.
|
||||
output="t-download-$$"
|
||||
trap 'rm -f "$output"' EXIT
|
||||
|
||||
Reference in New Issue
Block a user