mirror of
https://github.com/actions/toolkit
synced 2025-05-09 00:22:56 +00: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
1 changed files with 9 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue