mirror of https://github.com/aminya/setup-cpp
fix: fix execaSudo
This commit is contained in:
parent
51da3adc7b
commit
c9b478842d
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -20,7 +20,7 @@ export function mightSudo(command: string) {
|
|||
|
||||
export function execaSudo(file: string, args: string[]) {
|
||||
if (isRoot()) {
|
||||
return execa("sudo", [file, ...args])
|
||||
return execa.command(`sudo ${[file, ...args].join(" ")}`, { shell: true })
|
||||
} else {
|
||||
return execa(file, args)
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ export async function setupAptPack(
|
|||
version?: string,
|
||||
repository: boolean | string = true
|
||||
): Promise<InstallationInfo> {
|
||||
const apt = "apt-get" // mightSudo
|
||||
const apt = "apt-get"
|
||||
|
||||
if (typeof repository === "string") {
|
||||
await execaSudo("add-apt-repository", ["--update", "-y", repository])
|
||||
|
|
Loading…
Reference in New Issue