Skip to content

Changing the PATH changes the tar command used by the cache #642

Description

@dhadka

In actions/cache#465, the user's workflow was modifying the PATH while installing some custom software. This changed the tar implementation found when searching the PATH because it added C:/Program Files/Git/usr/bin. This broke caching since the cache action expected to use "BSD tar with GZip" during the restore step but would save the cache using "GNU tar with Zstd".

There is already work underway to always use GNU tar (when available), but even this could potentially run into issues if:

  1. The user modifies the PATH env var and removes all tar implementations
  2. The system starts without GNU tar but the user installs it in a subsequent step.

It therefore seems like we need the cache to "lock onto" a particular version of tar. My thinking is to record the tar implementation in the state which can then be used in the post step.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcache

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions