isSudo property

bool get isSudo

Returns true if we are currently running under sudo.

Implementation

bool get isSudo => !Settings().isWindows && env['SUDO_USER'] != null;