mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-11-18 16:11:07 +08:00
Fix Issue where we can no longer create zip files on windows during cli tests. (#520)
* Try using pwsh instead of powershell * Fallback to powershell * Format files correctly
This commit is contained in:
parent
2710592b73
commit
32f15666bd
@ -553,7 +553,9 @@ describe('@actions/tool-cache', function() {
|
||||
if (IS_WINDOWS) {
|
||||
const escapedStagingPath = stagingDir.replace(/'/g, "''") // double-up single quotes
|
||||
const escapedZipFile = zipFile.replace(/'/g, "''")
|
||||
const powershellPath = await io.which('powershell', true)
|
||||
const powershellPath =
|
||||
(await io.which('pwsh', false)) ||
|
||||
(await io.which('powershell', true))
|
||||
const args = [
|
||||
'-NoLogo',
|
||||
'-Sta',
|
||||
@ -604,7 +606,9 @@ describe('@actions/tool-cache', function() {
|
||||
if (IS_WINDOWS) {
|
||||
const escapedStagingPath = stagingDir.replace(/'/g, "''") // double-up single quotes
|
||||
const escapedZipFile = zipFile.replace(/'/g, "''")
|
||||
const powershellPath = await io.which('powershell', true)
|
||||
const powershellPath =
|
||||
(await io.which('pwsh', false)) ||
|
||||
(await io.which('powershell', true))
|
||||
const args = [
|
||||
'-NoLogo',
|
||||
'-Sta',
|
||||
@ -661,7 +665,9 @@ describe('@actions/tool-cache', function() {
|
||||
if (IS_WINDOWS) {
|
||||
const escapedStagingPath = stagingDir.replace(/'/g, "''") // double-up single quotes
|
||||
const escapedZipFile = zipFile.replace(/'/g, "''")
|
||||
const powershellPath = await io.which('powershell', true)
|
||||
const powershellPath =
|
||||
(await io.which('pwsh', false)) ||
|
||||
(await io.which('powershell', true))
|
||||
const args = [
|
||||
'-NoLogo',
|
||||
'-Sta',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user