diff --git a/package-lock.json b/package-lock.json index e1b08290..cb6f89a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4360,7 +4360,6 @@ "minipass": { "version": "2.3.5", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -4556,8 +4555,7 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, - "optional": true + "bundled": true }, "safer-buffer": { "version": "2.1.2", @@ -4647,8 +4645,7 @@ }, "yallist": { "version": "3.0.3", - "bundled": true, - "optional": true + "bundled": true } } }, diff --git a/packages/github/package-lock.json b/packages/github/package-lock.json index deceb0f6..1fb680e4 100644 --- a/packages/github/package-lock.json +++ b/packages/github/package-lock.json @@ -1,6 +1,6 @@ { "name": "@actions/github", - "version": "1.0.1", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/tool-cache/__tests__/externals/zip b/packages/tool-cache/__tests__/externals/zip deleted file mode 100755 index 1bbc48ef..00000000 Binary files a/packages/tool-cache/__tests__/externals/zip and /dev/null differ diff --git a/packages/tool-cache/__tests__/externals/zip-darwin b/packages/tool-cache/__tests__/externals/zip-darwin deleted file mode 100755 index 60424b08..00000000 Binary files a/packages/tool-cache/__tests__/externals/zip-darwin and /dev/null differ diff --git a/packages/tool-cache/__tests__/tool-cache.test.ts b/packages/tool-cache/__tests__/tool-cache.test.ts index 35f90be1..ff85a200 100644 --- a/packages/tool-cache/__tests__/tool-cache.test.ts +++ b/packages/tool-cache/__tests__/tool-cache.test.ts @@ -287,9 +287,7 @@ describe('@actions/tool-cache', function() { ] await exec.exec(`"${powershellPath}"`, args) } else { - const zipBin: string = - process.platform === 'darwin' ? 'zip-darwin' : 'zip' - const zipPath: string = path.join(__dirname, 'externals', zipBin) + const zipPath: string = await io.which('zip') await exec.exec(`"${zipPath}`, [zipFile, '-r', '.'], {cwd: stagingDir}) } @@ -340,9 +338,7 @@ describe('@actions/tool-cache', function() { ] await exec.exec(`"${powershellPath}"`, args) } else { - const zipBin: string = - process.platform === 'darwin' ? 'zip-darwin' : 'zip' - const zipPath = path.join(__dirname, 'externals', zipBin) + const zipPath: string = await io.which('zip') await exec.exec(zipPath, [zipFile, '-r', '.'], {cwd: stagingDir}) } diff --git a/packages/tool-cache/package-lock.json b/packages/tool-cache/package-lock.json index 9b7e0ed1..ffea2aa0 100644 --- a/packages/tool-cache/package-lock.json +++ b/packages/tool-cache/package-lock.json @@ -1,6 +1,6 @@ { "name": "@actions/tool-cache", - "version": "1.1.0", + "version": "1.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/tool-cache/scripts/externals/unzip b/packages/tool-cache/scripts/externals/unzip deleted file mode 100755 index 40824180..00000000 Binary files a/packages/tool-cache/scripts/externals/unzip and /dev/null differ diff --git a/packages/tool-cache/scripts/externals/unzip-darwin b/packages/tool-cache/scripts/externals/unzip-darwin deleted file mode 100755 index 4ef15045..00000000 Binary files a/packages/tool-cache/scripts/externals/unzip-darwin and /dev/null differ diff --git a/packages/tool-cache/src/tool-cache.ts b/packages/tool-cache/src/tool-cache.ts index 0dd556c3..9ab2deb5 100644 --- a/packages/tool-cache/src/tool-cache.ts +++ b/packages/tool-cache/src/tool-cache.ts @@ -223,11 +223,7 @@ export async function extractZip(file: string, dest?: string): Promise { if (IS_WINDOWS) { await extractZipWin(file, dest) } else { - if (process.platform === 'darwin') { - await extractZipDarwin(file, dest) - } else { - await extractZipNix(file, dest) - } + await extractZipNix(file, dest) } return dest @@ -255,18 +251,7 @@ async function extractZipWin(file: string, dest: string): Promise { } async function extractZipNix(file: string, dest: string): Promise { - const unzipPath = path.join(__dirname, '..', 'scripts', 'externals', 'unzip') - await exec(`"${unzipPath}"`, [file], {cwd: dest}) -} - -async function extractZipDarwin(file: string, dest: string): Promise { - const unzipPath = path.join( - __dirname, - '..', - 'scripts', - 'externals', - 'unzip-darwin' - ) + const unzipPath = await io.which('unzip') await exec(`"${unzipPath}"`, [file], {cwd: dest}) }