Switch extractZipNix to use the -n #554
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Without expressing a preference on whether to overwrite a file or not, unzip, by default, will prompt for user input on what it should do. Causing any CI actions that use this function to timeout, which is undesirable.
This causes issues in actions upstream such as actions-rs/install#6
There is only two ways to change unzip's default and that is with
-n
and-o
respectively,-n
would probably be the preferred default, as otherwise, files may be unintentionally overwritten.Another approach to solving this problem would be to allow callers of
extractZip
to specify how they want to treat existing files, however that would require a change to the functions signature, as well as making more difficult to maintain two different platform behaviors.(extract on what the options do from the unzip man page)