nienbo / cache-buildkite-plugin

Tarball, Rsync & S3 Cache Kit for Buildkite. Supports Linux, macOS and Windows
https://buildkite.com/plugins
MIT License
67 stars 39 forks source link

--ignore-failed-read is not supported on macOS #5

Closed djmarcin closed 4 years ago

djmarcin commented 4 years ago

Attempting to use the tar plugin on a macOS machine fails:

tar: Option --ignore-failed-read is not supported

  | Usage:   | List: tar -tf   | Extract: tar -xf   | Create: tar -cf [filenames...]   | Help: tar --help   | 🚨 Error: The plugin cache post-command hook exited with status 1

gencer commented 4 years ago

Hm.. It seems macOS has a very different tar syntax. Probably we should use tar without --ignore-failed-read on macOS. I'll throw a fix now.

I am thinking to make cache plugin very extensible by splitting code into pieces in its own files. So, for now a draft fix could be more than enough until I finally come up with a permanent solution.

gencer commented 4 years ago

Hi @djmarcin. Can you test against master?

   - gencer/cache#master:
      ...
gencer commented 4 years ago

P.S.: Another option in here to use --warning=no-file-changed. I will surely include this one in next version.

If you want I can add this now so you can try on master with this option? But I'm unsure if this is the exact same behavior as actual option. So, might be needed to test before actually using it.

djmarcin commented 4 years ago

Yes -- I believe macOS uses bsdtar while linux uses GNU tar. Another workaround is using the rsync method on macOS.

I will test with master.

djmarcin commented 4 years ago

It looks like master works. 👍

gencer commented 4 years ago

Then let's make a new release for this. 👌

gencer commented 4 years ago

Released in v2.0.9 🎉.

P.S.: Don't forget to star ✨ this plugin if you like it.