Skip to content
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

The tar command fails on a Windows runner #20

Closed
hongaar opened this issue Aug 10, 2020 · 1 comment · Fixed by #23
Closed

The tar command fails on a Windows runner #20

hongaar opened this issue Aug 10, 2020 · 1 comment · Fixed by #23
Labels
bug Something isn't working

Comments

@hongaar
Copy link

hongaar commented Aug 10, 2020

Describe the bug
The tar command fails on a Windows runner.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://github.com/exivity/rabbitmq-windows-docker/runs/966529913
  2. Click on Post Run satackey/action-docker-layer-caching@v0.0.5
  3. Expand the step starting with sh -c docker save [...]
  4. See error

Expected behavior
The Post Run to succeed

Debug logs

sh -c docker save '1ea7049bf5c6' '1ea7049bf5c6' '598c98f7b656' '912539758c76' 'dcbc260c6b09' 'a3cb6ed51c1b' 'e3de158569a9' '399de6e28bb0' '8809fb27bbb2' '4df9dd644716' '148c3b76ab54' '2b250bc046c1' 'e5e57296b9ca' '1ff1fd5e1fa2' '866b450c8b64' '68d6ccbac8d9' '7ca015404fc3' '318b2224022d' '5b43130792e4' '6c12dc0a117c' '987b1d5e0abf' 'exivity/rabbitmq:3.8.6' '1ea7049bf5c6' '598c98f7b656' '912539758c76' 'dcbc260c6b09' 'a3cb6ed51c1b' 'e3de158569a9' '399de6e28bb0' '8809fb27bbb2' '4df9dd644716' '148c3b76ab54' '2b250bc046c1' 'e5e57296b9ca' '1ff1fd5e1fa2' '866b450c8b64' '68d6ccbac8d9' '7ca015404fc3' '318b2224022d' '5b43130792e4' '6c12dc0a117c' '987b1d5e0abf' | tar xf - -C d:\a\rabbitmq-windows-docker\rabbitmq-windows-docker\.action-docker-layer-caching-docker_images\image
  "C:\Program Files\Git\bin\sh.exe" -c "docker save '1ea7049bf5c6' '1ea7049bf5c6' '598c98f7b656' '912539758c76' 'dcbc260c6b09' 'a3cb6ed51c1b' 'e3de158569a9' '399de6e28bb0' '8809fb27bbb2' '4df9dd644716' '148c3b76ab54' '2b250bc046c1' 'e5e57296b9ca' '1ff1fd5e1fa2' '866b450c8b64' '68d6ccbac8d9' '7ca015404fc3' '318b2224022d' '5b43130792e4' '6c12dc0a117c' '987b1d5e0abf' 'exivity/rabbitmq:3.8.6' '1ea7049bf5c6' '598c98f7b656' '912539758c76' 'dcbc260c6b09' 'a3cb6ed51c1b' 'e3de158569a9' '399de6e28bb0' '8809fb27bbb2' '4df9dd644716' '148c3b76ab54' '2b250bc046c1' 'e5e57296b9ca' '1ff1fd5e1fa2' '866b450c8b64' '68d6ccbac8d9' '7ca015404fc3' '318b2224022d' '5b43130792e4' '6c12dc0a117c' '987b1d5e0abf' | tar xf - -C d:\a\rabbitmq-windows-docker\rabbitmq-windows-docker\.action-docker-layer-caching-docker_images\image"
  tar: d\:arabbitmq-windows-dockerrabbitmq-windows-docker.action-docker-layer-caching-docker_imagesimage: Cannot open: No such file or directory
  tar: Error is not recoverable: exiting now
  write /dev/stdout: The pipe is being closed.
  Error: The process 'C:\Program Files\Git\bin\sh.exe' failed with exit code 2
      at ExecState._setResult (d:\a\_actions\satackey\action-docker-layer-caching\v0.0.5\dist\ttsc-dist\post.js\index.js:1300:25)
      at ExecState.CheckComplete (d:\a\_actions\satackey\action-docker-layer-caching\v0.0.5\dist\ttsc-dist\post.js\index.js:1283:18)
      at ChildProcess.<anonymous> (d:\a\_actions\satackey\action-docker-layer-caching\v0.0.5\dist\ttsc-dist\post.js\index.js:1183:27)
      at ChildProcess.emit (events.js:210:5)
      at maybeClose (internal/child_process.js:1021:16)
      at Socket.<anonymous> (internal/child_process.js:430:11)
      at Socket.emit (events.js:210:5)
      at Pipe.<anonymous> (net.js:659:12)
  ##[error]Error: The process 'C:\Program Files\Git\bin\sh.exe' failed with exit code 2

Runner Environment (please complete the following information):

  • OS: windows-2019
  • Action version: v0.0.5

Additional context
Seems that the arguments to the tar command are not properly escaped on Windows which causes all directories to be concatenated (where path separators are expected). I think the relevant is here: https://github.com/satackey/action-docker-layer-caching/blob/master/src/LayerCache.ts#L59

@hongaar hongaar added the bug Something isn't working label Aug 10, 2020
hongaar added a commit to exivity-archive/rabbitmq-windows-docker that referenced this issue Aug 10, 2020
satackey added a commit that referenced this issue Aug 15, 2020
@satackey
Copy link
Owner

I fixed this in v0.0.8 (#23).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants