-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --overwrite flag to tar extraction #156
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stmcginnis sorry for the late response
Thank you this is very needed, but could you please make the changes in src folder,
the dist folder should be generated (npm run all
)
Thanks, still learning how things are laid out. Thanks for the pointer! I think I have it now, but please let me know if I'm missing anything. Update coming shortly. |
There are times when previous actions have already extracted at least some files to the cache location. This results in subsequent cache extraction operations to emit errors such as: > /usr/bin/tar: [dest_file_path]: Cannot open: File exists This adds the --overwrite flag to the extract call to force tar to just overwrite these files rather than reporting errors. Signed-off-by: Sean McGinnis <[email protected]>
Another approach may be to try to get something added to https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts |
@stmcginnis I merged the master branch and run formation and linter on this PR |
Thanks @SVilgelm! I think there are issues with this approach due to running on different platforms with different versions of tar. I've submitted actions/toolkit#717 to try to address this in a different way. Will wait to close this out to see how things go with that PR. Shouldn't need additional follow up here, but will see if that is needed. Maybe to update dependency once/if a new version of that dependency needs to be picked up. |
@stmcginnis Could you please test it and merge if it works fine? I pushed some changes to this PR to ignore macOS platform, I tested on my laptop and the tar overrides the files |
Thanks, this looks like it does it! I don't appear to have the ability to merge though. |
ok, np, I will merge and bump a new version |
There are times when previous actions have already extracted at least
some files to the cache location. This results in subsequent cache
extraction operations to emit errors such as:
This adds the --overwrite flag to the extract call to force tar to
just overwrite these files rather than reporting errors.
This is a somewhat naive attempt to address #135