mirror of
https://github.com/appium/appium.git
synced 2026-04-26 05:18:53 -05:00
loosen up sudo check so it allows various forms of authorize
This commit is contained in:
+2
-1
@@ -19,11 +19,12 @@ if (require.main === module) {
|
||||
logger = logFactory.get('appium');
|
||||
|
||||
var appiumPermStat = fs.statSync(path.resolve(__dirname, '../../package.json'));
|
||||
var launchCmd = (process.env.SUDO_COMMAND || "").toLowerCase();
|
||||
|
||||
if (
|
||||
!isWindows &&
|
||||
(!_(process.env.SUDO_UID).isUndefined() || appiumPermStat.uid !== process.getuid()) &&
|
||||
!(process.env.SUDO_COMMAND || "").match(/grunt authorize/)
|
||||
!launchCmd.match(/authorize/)
|
||||
) {
|
||||
logger.error("Appium will not work if used or installed with sudo. " +
|
||||
"Please rerun/install as a non-root user. If you had to install " +
|
||||
|
||||
Reference in New Issue
Block a user