mirror of
https://github.com/actions/toolkit
synced 2025-05-10 00:53:10 +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) {
|
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…
Add table
Add a link
Reference in a new issue