mirror of https://github.com/aminya/setup-cpp
fix: do not assume that CI (e.g. Docker) is root
This commit is contained in:
parent
2cdfbab204
commit
0d99c85e65
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,7 @@ import execa from "execa"
|
|||
|
||||
/** Detect if sudo is available and the user has root privileges */
|
||||
export function isSudo(): boolean {
|
||||
return (Boolean(process.env.CI) || isRoot()) && which.sync("sudo", { nothrow: true }) !== null
|
||||
return isRoot() && which.sync("sudo", { nothrow: true }) !== null
|
||||
}
|
||||
|
||||
/** Detect if the process has root privileges */
|
||||
|
|
Loading…
Reference in New Issue