mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-02 10:13:36 +08:00
Check if tool path exists before executing (#385)
This commit is contained in:
@@ -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})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user