-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Prefer using GNU tar #553
Prefer using GNU tar #553
Conversation
0aeda7f
to
17eb221
Compare
if (filePath) { | ||
return filePath | ||
} | ||
/** |
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.
Most of the which
method is now in findInPath
. Most of the changes are just indentation...use the "hide whitespace changes" option for easier viewing.
@@ -64,7 +64,7 @@ async function getVersion(app: string): Promise<string> { | |||
core.debug(`Checking ${app} --version`) | |||
let versionOutput = '' | |||
try { | |||
await exec.exec(`${app} --version`, [], { | |||
await exec.exec(`"${app}" --version`, [], { |
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.
await exec.exec(`"${app}" --version`, [], { | |
await exec.exec(app, ['--version'], { |
@dhadka Is there any progress on this? If you are busy, I can take over this. |
The BSD Tar that ships with macOS has a bug that can cause it to create empty tar files, which can cause bad caches to be created on GitHub Actions. An example of this error is here: https://github.com/P3KI/bendy/pull/48/checks?check_run_id=1421741031#step:9:39 And here are a couple discussions: actions/cache#403 actions/toolkit#553 As a workaround, this patch installs GNU Tar on macos in all jobs that use the cache. It also adds `0-` to all cache keys to make sure that future CI builds don't hit the old, corrupted cache. This can be removed once `Cargo.lock` changes.
Closing for #610 |
Fixes a variety of actions/cache issues related to differences between BSD and GNU tar.
The old
which
function already scanned the system path for the executable, but would return the first hit. This change moves most of this functionality into a new method,findInPath
, which will return a list of all matches on the system path. This allows the cache module to scan all availabletar
implementations to find GNU tar.Fixes #552
Fixes actions/cache#362 - OS-agnostic caches miss on Windows due to different compression (caused by zstd issue)
Fixes actions/cache#315 - infinite recursion in
bsdtar
caused by junction points on windowsFixes actions/cache#301 -
zstd
hangs when used withbsdtar