Revert "fix: do not assume that CI (e.g. Docker) is root"

This reverts commit 0d99c85e65.
This commit is contained in:
Amin Yahyaabadi 2022-08-07 18:35:23 -07:00
parent 277b6ccd95
commit 41bcd6a578
1 changed files with 1 additions and 1 deletions

View File

@ -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 */