1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

guix-download: Gracefully handle invalid URIs.

* guix-download.in (guix-download): Error out when `string->uri'
  returns #f.  Use `leave' when the scheme is unknown.
* tests/guix-download.sh: Add tests.
This commit is contained in:
Ludovic Courtès
2012-11-13 22:13:11 +01:00
parent db32c281dd
commit ecdb81e159
2 changed files with 11 additions and 6 deletions

View File

@@ -25,3 +25,9 @@ guix-download --version
# Make sure it fails here.
if guix-download http://www.example.com/does-not-exist
then false; else true; fi
if guix-download unknown://some/where;
then false; else true; fi
if guix-download not/a/uri;
then false; else true; fi