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