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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user