Closed Michael-Gannon closed 10 years ago
Nice catch. The issue was awkwardly phrased so to reiterate, if src
expands to an empty array, grunt-zip
still says that it created the directory even though it didn't.
unzip: {
doesnotexist: {
src: 'doesnotexist.zip',
dest: 'hello/'
}
}
// grunt unzip logs 'File "hello/" created.'
I will take a look at this by the end of next weekend.
Yeah you've got the idea. Logging aside should it return a fail if it was unable to perform the unzip? It sounds like a fail scenario.
I don't think it should fail, we just need to update the wording. The user will read that and realize something needs correction. This also seems to be grunt convention:
https://github.com/gruntjs/grunt-contrib-copy/blob/v0.5.0/tasks/copy.js#L35-L71
Deciding to move this to the front of my queue due to its simplicity.
All done. This has been released in 0.13.0
. Additionally, I added verbose
output for more detailed output when using grunt --verbose
.
I don't think it should fail, we just need to update the wording. The user will read that and realize something needs correction. This also seems to be grunt convention:
https://github.com/gruntjs/grunt-contrib-copy/blob/v0.5.0/tasks/copy.js#L35-L71
grunt-contrib-copy has an option nonull
- if this option is true and file not found grunt fails.
would be great to have the same behaviour to grunt-zip.
flag --verbose does help, but still would be nice to have nonull
flag in grunt-zip.
@bladerunner2020 Due to reduced popularity of grunt
and personal priorities with other tasks, I'm not actively adding features to this repo. I'll happily accept a PR on that though
If the configuration specified cannot resolve a file(s) to unzip the output is successful and 'File "' + this.file.dest + '" created.' is printed, this is not true if the files were not found.