forked from mirrors/nixpkgs
fetchzip: improve error message
This commit is contained in:
parent
d191c5c498
commit
a01b6a0d07
|
@ -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 *)
|
||||
|
|
Loading…
Reference in a new issue