1
0
Fork 0
mirror of https://github.com/actions/toolkit synced 2025-05-10 17:12:54 +00:00

use zip and unzip from path (#161)

This commit is contained in:
Bryan MacFarlane 2019-09-24 17:07:08 -04:00 committed by GitHub
parent 3116829a9b
commit 67eeeea9fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 8 additions and 30 deletions

View file

@ -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})
}