1
0
Fork 0

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
pull/519/head
Thomas Boop 2020-07-16 11:51:00 -04:00 committed by GitHub
parent 2710592b73
commit 32f15666bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 3 deletions

View File

@ -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',