make sure appium won't run under sudo. Too many people run into problems with that

This commit is contained in:
Jonathan Lipps
2014-03-21 14:55:48 -07:00
parent 97743318c3
commit f10e919597

View File

@@ -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')