Skip to content

Commit

Permalink
Fix appium shell
Browse files Browse the repository at this point in the history
node appium.js --shell
  • Loading branch information
bootstraponline committed Dec 27, 2013
1 parent 20c368f commit f603af0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/appium.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var startRepl = function() {
});
};

if (process.argv[2] === "shell") {
if (process.argv[2] && process.argv[2].trim() === "--shell") {
startRepl();
} else {
appium.run(args, function() { /* console.log('Rock and roll.'.grey); */ });
Expand Down
5 changes: 3 additions & 2 deletions docs/server-args.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All flags are optional, but some are required in conjunction with certain others

|Flag|Default|Description|Example|
|----|-------|-----------|-------|
|`--shell`|null|Enter REPL mode||
|`--app`|null|IOS: abs path to simulator-compiled .app file or the bundle_id of the desired target on device; Android: abs path to .apk file|`--app /abs/path/to/my.app`|
|`--ipa`|null|(IOS-only) abs path to compiled .ipa file|`--ipa /abs/path/to/my.ipa`|
|`-q`, `--quiet`|false|Don't use verbose logging output||
Expand All @@ -34,7 +35,7 @@ All flags are optional, but some are required in conjunction with certain others
|`--device-ready-timeout`|5|(Android-only) Timeout in seconds while waiting for device to become ready|`--device-ready-timeout 5`|
|`--safari`|false|(IOS-Only) Use the safari app||
|`--device-name`|null|(IOS-Simulator-only) name of the iOS device to use|`--device-name iPhone Retina (4-inch)`|
|`--default-device`|false|(IOS-Simulator-only) use the default simulator that instruments launches on its own||
|`--default-device`, `-dd`|false|(IOS-Simulator-only) use the default simulator that instruments launches on its own||
|`--force-iphone`|false|(IOS-only) Use the iPhone Simulator no matter what the app wants||
|`--force-ipad`|false|(IOS-only) Use the iPad Simulator no matter what the app wants||
|`--language`|null|(IOS-only) language for the iOS simulator|`--language en`|
Expand All @@ -47,7 +48,7 @@ All flags are optional, but some are required in conjunction with certain others
|`-rp`, `--robot-port`|-1|port for robot|`--robot-port 4242`|
|`--selendroid-port`|8080|Local port used for communication with Selendroid|`--selendroid-port 8080`|
|`--use-keystore`|false|(Android-only) When set the keystore will be used to sign apks.||
|`--keystore-path`|/Users/jlipps/.android/debug.keystore|(Android-only) Path to keystore||
|`--keystore-path`|/Users/user/.android/debug.keystore|(Android-only) Path to keystore||
|`--keystore-password`|android|(Android-only) Password to keystore||
|`--key-alias`|androiddebugkey|(Android-only) Key alias||
|`--key-password`|android|(Android-only) Key password||
Expand Down
7 changes: 7 additions & 0 deletions lib/server/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ var ap = require('argparse').ArgumentParser
, _ = require('underscore');

var args = [
[['--shell'] , {
required: false
, defaultValue: null
, help: 'Enter REPL mode'
, nargs: 0
}],

[['--app'] , {
required: false
, defaultValue: null
Expand Down

0 comments on commit f603af0

Please sign in to comment.