fetchzip: improve error message

This commit is contained in:
Domen Kožar 2016-05-17 17:32:40 +01:00
parent d191c5c498
commit a01b6a0d07

View file

@ -38,6 +38,7 @@ lib.overrideDerivation (fetchurl ({
+ (if stripRoot then ''
if [ $(ls "$unpackDir" | wc -l) != 1 ]; then
echo "error: zip file must contain a single file or directory."
echo "hint: Pass stripRoot=false; to fetchzip to assume flat list of files."
exit 1
fi
fn=$(cd "$unpackDir" && echo *)