Skip to content

Commit

Permalink
make sure appium won't run under sudo. Too many people run into probl…
Browse files Browse the repository at this point in the history
…ems with that
  • Loading branch information
jlipps committed Mar 21, 2014
1 parent 9774331 commit f10e919
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/server/main.js
Expand Up @@ -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')
Expand Down

0 comments on commit f10e919

Please sign in to comment.