Skip to content

Commit

Permalink
make sure show-config works with npm (fix #1630)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlipps committed Dec 17, 2013
1 parent 9fe8358 commit 24e899b
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions lib/server/main.js
Expand Up @@ -31,18 +31,19 @@ var http = require('http')
, conditionallyPreLaunch = helpers.conditionallyPreLaunch
, noColorLogger = helpers.noColorLogger;

if (require.main === module && args.showConfig) {
try {
var config = fs.readFileSync(configFile);
console.log(config.toString('utf8'));
process.exit(0);
} catch (e) {
console.error("Error: Appium is not correctly configured");
process.exit(1);
var main = function(args, readyCb, doneCb) {

if (args.showConfig) {
try {
var config = fs.readFileSync(configFile);
console.log(config.toString('utf8'));
process.exit(0);
} catch (e) {
console.error("Error: Appium is not correctly configured");
process.exit(1);
}
}
}

var main = function(args, readyCb, doneCb) {
checkArgs(args);
if (typeof doneCb === "undefined") {
doneCb = function() {};
Expand Down

0 comments on commit 24e899b

Please sign in to comment.