mirror of
https://github.com/appium/appium.git
synced 2026-04-29 15:01:27 -05:00
make sure show-config works with npm (fix #1630)
This commit is contained in:
+12
-11
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
checkArgs(args);
|
||||
if (typeof doneCb === "undefined") {
|
||||
doneCb = function() {};
|
||||
|
||||
Reference in New Issue
Block a user