Check if tool path exists before executing (#385)

This commit is contained in:
Reinier Timmer
2020-04-28 16:36:49 +02:00
committed by GitHub
parent 1e88dec883
commit 34f71e80ce
2 changed files with 5 additions and 5 deletions

View File

@@ -461,7 +461,7 @@ describe('@actions/tool-cache', function() {
]
await exec.exec(`"${powershellPath}"`, args)
} else {
const zipPath: string = await io.which('zip')
const zipPath: string = await io.which('zip', true)
await exec.exec(`"${zipPath}`, [zipFile, '-r', '.'], {cwd: stagingDir})
}
@@ -512,7 +512,7 @@ describe('@actions/tool-cache', function() {
]
await exec.exec(`"${powershellPath}"`, args)
} else {
const zipPath: string = await io.which('zip')
const zipPath: string = await io.which('zip', true)
await exec.exec(zipPath, [zipFile, '-r', '.'], {cwd: stagingDir})
}
@@ -569,7 +569,7 @@ describe('@actions/tool-cache', function() {
]
await exec.exec(`"${powershellPath}"`, args)
} else {
const zipPath: string = await io.which('zip')
const zipPath: string = await io.which('zip', true)
await exec.exec(zipPath, [zipFile, '-r', '.'], {cwd: stagingDir})
}