-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
The save and restore steps use the first tar on the path:
Line 64 in 4809f4a
| const tarPath = await io.which("tar", true); |
This can cause problems if another step modifies the path so that a different version of tar is found first. For example, in this workflow, I installed R and Rtools, which added C:/Rtools/bin to the path. There is a copy of tar.exe in there, as well as gzip.exe. However, when actions/cache tries to use tar, it errors out saying it can't find gzip. I'm not sure why exactly that error happens, since gzip is in the same directory. But it seems to me that actions/cache shouldn't even try to use that copy of tar in the first place -- it should always use the same copy of tar, no matter what other steps are used in the workflow.
Here's the error:
Post job cleanup.
C:\Rtools\bin\tar.exe -cz --force-local -f d:/a/_temp/96241c04-a852-4c66-8b28-aae83ff432c1/cache.tgz -C d:/a/_temp/Library .
tar (child): gzip: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
/Rtools/bin/tar: d\:/a/_temp/96241c04-a852-4c66-8b28-aae83ff432c1/cache.tgz: Cannot write: Broken pipe
/Rtools/bin/tar: Child returned status 2
/Rtools/bin/tar: Error is not recoverable: exiting now
[warning]The process 'C:\Rtools\bin\tar.exe' failed with exit code 2