diff --git a/packages/sudo-tools/src/index.ts b/packages/sudo-tools/src/index.ts index d564cc44..028d8654 100644 --- a/packages/sudo-tools/src/index.ts +++ b/packages/sudo-tools/src/index.ts @@ -3,7 +3,7 @@ import execa from "execa" /** Detect if sudo is available and the user has root privileges */ 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 */