mirror of
https://github.com/appium/appium.git
synced 2026-02-12 21:10:10 -06:00
make sure appium won't run under sudo. Too many people run into problems with that
This commit is contained in:
@@ -14,6 +14,15 @@ if (require.main === module) {
|
||||
|
||||
logger = logFactory.get('appium');
|
||||
|
||||
if (typeof process.env.SUDO_UID !== "undefined") {
|
||||
logger.error("Appium will not function correctly if used under sudo. " +
|
||||
"Please rerun as a non-root user. If you had to install " +
|
||||
"Appium using `sudo npm install -g appium`, the solution " +
|
||||
"is to reinstall Node using a method (Homebrew, for example) " +
|
||||
"that doesn't require sudo to install global npm packages.");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
var http = require('http')
|
||||
, express = require('express')
|
||||
, path = require('path')
|
||||
|
||||
Reference in New Issue
Block a user