mirror of https://github.com/actions/toolkit
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 correctlypull/519/head
parent
2710592b73
commit
32f15666bd
|
@ -553,7 +553,9 @@ describe('@actions/tool-cache', function() {
|
||||||
if (IS_WINDOWS) {
|
if (IS_WINDOWS) {
|
||||||
const escapedStagingPath = stagingDir.replace(/'/g, "''") // double-up single quotes
|
const escapedStagingPath = stagingDir.replace(/'/g, "''") // double-up single quotes
|
||||||
const escapedZipFile = zipFile.replace(/'/g, "''")
|
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 = [
|
const args = [
|
||||||
'-NoLogo',
|
'-NoLogo',
|
||||||
'-Sta',
|
'-Sta',
|
||||||
|
@ -604,7 +606,9 @@ describe('@actions/tool-cache', function() {
|
||||||
if (IS_WINDOWS) {
|
if (IS_WINDOWS) {
|
||||||
const escapedStagingPath = stagingDir.replace(/'/g, "''") // double-up single quotes
|
const escapedStagingPath = stagingDir.replace(/'/g, "''") // double-up single quotes
|
||||||
const escapedZipFile = zipFile.replace(/'/g, "''")
|
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 = [
|
const args = [
|
||||||
'-NoLogo',
|
'-NoLogo',
|
||||||
'-Sta',
|
'-Sta',
|
||||||
|
@ -661,7 +665,9 @@ describe('@actions/tool-cache', function() {
|
||||||
if (IS_WINDOWS) {
|
if (IS_WINDOWS) {
|
||||||
const escapedStagingPath = stagingDir.replace(/'/g, "''") // double-up single quotes
|
const escapedStagingPath = stagingDir.replace(/'/g, "''") // double-up single quotes
|
||||||
const escapedZipFile = zipFile.replace(/'/g, "''")
|
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 = [
|
const args = [
|
||||||
'-NoLogo',
|
'-NoLogo',
|
||||||
'-Sta',
|
'-Sta',
|
||||||
|
|
Loading…
Reference in New Issue