Skip to content

Commit 7d0cc67

Browse files
committed
Revert "fix: update execa"
This reverts commit 12fe81a.
1 parent af12acc commit 7d0cc67

File tree

13 files changed

+32
-96
lines changed

13 files changed

+32
-96
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@actions/exec": "^1.1.0",
3434
"@actions/io": "^1.1.1",
3535
"@actions/tool-cache": "^1.7.1",
36-
"execa": "^6.0.0",
36+
"execa": "^5.1.1",
3737
"hasha": "^5.2.2",
3838
"mri": "^1.2.0",
3939
"semver": "^7.3.5",

pnpm-lock.yaml

Lines changed: 5 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/chocolatey/chocolatey.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable require-atomic-updates */
2-
import * as execa from "execa"
2+
import execa from "execa"
33
import { existsSync } from "fs"
44
import { dirname } from "path"
55
import which from "which"
@@ -30,7 +30,7 @@ export function setupChocolatey(
3030
}
3131

3232
// https://docs.chocolatey.org/en-us/choco/setup#install-with-cmd.exe
33-
execa.execaCommandSync(
33+
execa.commandSync(
3434
`@"%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\\chocolatey\\bin"`
3535
)
3636

src/doxygen/doxygen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ export async function setupDoxygen(version: string | undefined, _setupDir: strin
1919
* See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2020
* The process cannot access the file 'C:\ProgramData\chocolatey\lib\Graphviz\.chocolateyPending' because it is being used by another process.
2121
*
22-
* 18 | execa.execaSync("choco", ["install", "-y", name, `--version=${version}`, ...args])
22+
* 18 | execa.sync("choco", ["install", "-y", name, `--version=${version}`, ...args])
2323
* 19 | } else {
24-
* > 20 | execa.execaSync("choco", ["install", "-y", name, ...args])
24+
* > 20 | execa.sync("choco", ["install", "-y", name, ...args])
2525
* | ^
2626
* 21 | }
2727
* 22 |

src/utils/env/sudo.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as execa from "execa"
1+
import execa from "execa"
22
import which from "which"
33

44
let _issudo: boolean | undefined = undefined
@@ -21,8 +21,8 @@ export function mightSudo(command: string) {
2121

2222
export function execaSudo(file: string, args: string[]) {
2323
if (isRoot()) {
24-
return execa.execaCommand(`sudo ${[file, ...args].join(" ")}`, { shell: true })
24+
return execa.command(`sudo ${[file, ...args].join(" ")}`, { shell: true })
2525
} else {
26-
return execa.execa(file, args)
26+
return execa(file, args)
2727
}
2828
}

src/utils/path/addPath.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { addPath as ghAddPath } from "@actions/core"
22
import { delimiter } from "path"
33
import * as core from "@actions/core"
4-
import * as execa from "execa"
4+
import execa from "execa"
55

66
/** An add path function that works locally or inside GitHub Actions */
77
export function addPath(path: string) {
@@ -12,13 +12,13 @@ export function addPath(path: string) {
1212
core.error(err as Error)
1313
switch (process.platform) {
1414
case "win32": {
15-
execa.execaSync(`setx PATH=${path};%PATH%`)
15+
execa.sync(`setx PATH=${path};%PATH%`)
1616
return
1717
}
1818
case "linux":
1919
case "darwin": {
20-
execa.execaCommandSync(`echo "export PATH=${path}:$PATH" >> ~/.profile`)
21-
execa.execaCommandSync(`source ~/.profile`)
20+
execa.commandSync(`echo "export PATH=${path}:$PATH" >> ~/.profile`)
21+
execa.commandSync(`source ~/.profile`)
2222
core.info(`${path} was added to ~/.profile`)
2323
return
2424
}

src/utils/setup/extract.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import * as execa from "execa"
1+
import execa from "execa"
22
import { mkdirP } from "@actions/io"
33
export { extractTar, extractXar, extract7z, extractZip } from "@actions/tool-cache"
44

55
export async function extractExe(file: string, dest: string) {
6-
await execa.execa("7z", ["x", file, `-o${dest}`])
6+
await execa("7z", ["x", file, `-o${dest}`])
77
return dest
88
}
99

@@ -13,6 +13,6 @@ export async function extractTarByExe(file: string, dest: string, flags = ["--st
1313
} catch {
1414
// ignore
1515
}
16-
await execa.execa("tar", ["xf", file, "-C", dest, ...flags])
16+
await execa("tar", ["xf", file, "-C", dest, ...flags])
1717
return dest
1818
}

src/utils/setup/setupBrewPack.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable require-atomic-updates */
2-
import * as execa from "execa"
2+
import execa from "execa"
33
import which from "which"
44
import { setupBrew } from "../../brew/brew"
55
import { InstallationInfo } from "./setupBin"
@@ -14,7 +14,7 @@ export function setupBrewPack(name: string, version?: string): InstallationInfo
1414
}
1515

1616
// brew is not thread-safe
17-
execa.execaSync("brew", ["install", version !== undefined && version !== "" ? `${name}@${version}` : name])
17+
execa.sync("brew", ["install", version !== undefined && version !== "" ? `${name}@${version}` : name])
1818

1919
return { binDir: "/usr/local/bin/" }
2020
}

src/utils/setup/setupChocoPack.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { addPath } from "../path/addPath"
33
import which from "which"
44
import { setupChocolatey } from "../../chocolatey/chocolatey"
55
import { InstallationInfo } from "./setupBin"
6-
import * as execa from "execa"
6+
import execa from "execa"
77

88
let hasChoco = false
99

@@ -15,9 +15,9 @@ export async function setupChocoPack(name: string, version?: string, args: strin
1515
}
1616

1717
if (version !== undefined && version !== "") {
18-
execa.execaSync("choco", ["install", "-y", name, `--version=${version}`, ...args])
18+
execa.sync("choco", ["install", "-y", name, `--version=${version}`, ...args])
1919
} else {
20-
execa.execaSync("choco", ["install", "-y", name, ...args])
20+
execa.sync("choco", ["install", "-y", name, ...args])
2121
}
2222

2323
const binDir = "C:/ProgramData/Chocolatey/bin/"

src/utils/setup/setupPipPack.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable require-atomic-updates */
22
import { getExecOutput } from "@actions/exec"
3-
import * as execa from "execa"
3+
import execa from "execa"
44
import which from "which"
55
import { info } from "@actions/core"
66
import { addPath } from "../path/addPath"
@@ -26,7 +26,7 @@ export async function setupPipPack(name: string, version?: string) {
2626
}
2727
}
2828

29-
execa.execaSync(pip, ["install", version !== undefined && version !== "" ? `${name}==${version}` : name])
29+
execa.sync(pip, ["install", version !== undefined && version !== "" ? `${name}==${version}` : name])
3030

3131
if (binDir === undefined) {
3232
if (process.platform === "linux") {

src/vcpkg/vcpkg.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { addPath, warning } from "@actions/core"
2-
import * as execa from "execa"
2+
import execa from "execa"
33
import { existsSync } from "fs"
44
import { dirname, join } from "path"
55
import which from "which"
@@ -12,11 +12,11 @@ let hasVCPKG = false
1212
export function setupVcpkg(_version: string, setupDir: string, _arch: string): InstallationInfo {
1313
if (!hasVCPKG || which.sync("vcpkg", { nothrow: true }) === null) {
1414
if (!existsSync(join(setupDir, addShellExtension("bootstrap-vcpkg")))) {
15-
execa.execaSync("git", ["clone", "https://github.com/microsoft/vcpkg"], { cwd: dirname(setupDir) })
15+
execa.sync("git", ["clone", "https://github.com/microsoft/vcpkg"], { cwd: dirname(setupDir) })
1616
} else {
1717
warning(`Vcpkg folder already exists at ${setupDir}`)
1818
}
19-
execa.execaSync(addShellExtension(addShellHere("bootstrap-vcpkg")), { cwd: setupDir, shell: true })
19+
execa.sync(addShellExtension(addShellHere("bootstrap-vcpkg")), { cwd: setupDir, shell: true })
2020
addPath(setupDir)
2121
hasVCPKG = true
2222
return { binDir: setupDir }

0 commit comments

Comments
 (0)