From a4e3c3b64e77f4001b05b54ee3871ef057b7fe74 Mon Sep 17 00:00:00 2001
From: Josh Gross <joshmgross@github.com>
Date: Wed, 8 Apr 2020 10:58:38 -0400
Subject: [PATCH] Add -P flag for tar creation

---
 __tests__/tar.test.ts | 1 +
 dist/restore/index.js | 9 +++++----
 dist/save/index.js    | 9 +++++----
 src/tar.ts            | 1 +
 4 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/__tests__/tar.test.ts b/__tests__/tar.test.ts
index fdf637a..ca10f34 100644
--- a/__tests__/tar.test.ts
+++ b/__tests__/tar.test.ts
@@ -73,6 +73,7 @@ test("create tar", async () => {
             "-cz",
             "-f",
             CacheFilename,
+            "-P",
             "-C",
             workspace,
             "--files-from",
diff --git a/dist/restore/index.js b/dist/restore/index.js
index ac49982..2e71724 100644
--- a/dist/restore/index.js
+++ b/dist/restore/index.js
@@ -2182,12 +2182,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
 };
 Object.defineProperty(exports, "__esModule", { value: true });
 const core = __importStar(__webpack_require__(470));
-const fs = __importStar(__webpack_require__(747));
-const crypto = __importStar(__webpack_require__(417));
 const http_client_1 = __webpack_require__(539);
 const auth_1 = __webpack_require__(226);
-const utils = __importStar(__webpack_require__(443));
+const crypto = __importStar(__webpack_require__(417));
+const fs = __importStar(__webpack_require__(747));
 const constants_1 = __webpack_require__(694);
+const utils = __importStar(__webpack_require__(443));
 const versionSalt = "1.0";
 function isSuccessStatusCode(statusCode) {
     if (!statusCode) {
@@ -3185,8 +3185,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
 };
 Object.defineProperty(exports, "__esModule", { value: true });
 const core = __importStar(__webpack_require__(470));
-const io = __importStar(__webpack_require__(1));
 const glob = __importStar(__webpack_require__(281));
+const io = __importStar(__webpack_require__(1));
 const fs = __importStar(__webpack_require__(747));
 const path = __importStar(__webpack_require__(622));
 const util = __importStar(__webpack_require__(669));
@@ -5016,6 +5016,7 @@ function createTar(archiveFolder, sourceDirectories) {
             "-cz",
             "-f",
             constants_1.CacheFilename,
+            "-P",
             "-C",
             workingDirectory,
             "--files-from",
diff --git a/dist/save/index.js b/dist/save/index.js
index ca454ed..f807389 100644
--- a/dist/save/index.js
+++ b/dist/save/index.js
@@ -2182,12 +2182,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
 };
 Object.defineProperty(exports, "__esModule", { value: true });
 const core = __importStar(__webpack_require__(470));
-const fs = __importStar(__webpack_require__(747));
-const crypto = __importStar(__webpack_require__(417));
 const http_client_1 = __webpack_require__(539);
 const auth_1 = __webpack_require__(226);
-const utils = __importStar(__webpack_require__(443));
+const crypto = __importStar(__webpack_require__(417));
+const fs = __importStar(__webpack_require__(747));
 const constants_1 = __webpack_require__(694);
+const utils = __importStar(__webpack_require__(443));
 const versionSalt = "1.0";
 function isSuccessStatusCode(statusCode) {
     if (!statusCode) {
@@ -3185,8 +3185,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
 };
 Object.defineProperty(exports, "__esModule", { value: true });
 const core = __importStar(__webpack_require__(470));
-const io = __importStar(__webpack_require__(1));
 const glob = __importStar(__webpack_require__(281));
+const io = __importStar(__webpack_require__(1));
 const fs = __importStar(__webpack_require__(747));
 const path = __importStar(__webpack_require__(622));
 const util = __importStar(__webpack_require__(669));
@@ -4993,6 +4993,7 @@ function createTar(archiveFolder, sourceDirectories) {
             "-cz",
             "-f",
             constants_1.CacheFilename,
+            "-P",
             "-C",
             workingDirectory,
             "--files-from",
diff --git a/src/tar.ts b/src/tar.ts
index 3ca3019..9a1f446 100644
--- a/src/tar.ts
+++ b/src/tar.ts
@@ -59,6 +59,7 @@ export async function createTar(
         "-cz",
         "-f",
         CacheFilename,
+        "-P",
         "-C",
         workingDirectory,
         "--files-from",