Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Remove getParser code (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgraham authored Sep 5, 2018
1 parent 49bdef5 commit a976898
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 5 additions & 1 deletion app/main/appium.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function connectGetDefaultArgs () {
evt.returnValue = getDefaultArgs();
});

ipcMain.on('get-args-metadata', (evt) => {
ipcMain.on('get-args-metadata', (/*evt*/) => {
// If argv isn't defined, set it now. If argv[1] isn't defined, set it to empty string.
// If process.argv[1] is undefined, calling getParser() will break because argparse expects it to be a string
if (!process.argv) {
Expand All @@ -130,10 +130,14 @@ function connectGetDefaultArgs () {
if (!process.argv[1]) {
process.argv[1] = '';
}
// Temporarily remove this feature until 'getParser' issue (https://github.com/appium/appium/issues/11320) has been fixed
/*const backupPathResolve = path.resolve;
path.resolve = () => "node_modules/appium/package.json";
let defArgs = Object.keys(getDefaultArgs());
evt.returnValue = getParser().rawArgs
.filter((a) => defArgs.indexOf(a[1].dest) !== -1)
.map((a) => a[1]);
path.resolve = backupPathResolve;*/
});
}

Expand Down
4 changes: 3 additions & 1 deletion app/renderer/reducers/StartServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { ipcRenderer } from 'electron';
import { version as SERVER_VERSION } from 'appium/package.json';

export const DEFAULT_ARGS = ipcRenderer.sendSync('get-default-args');
export const ARG_DATA = ipcRenderer.sendSync('get-args-metadata');

// TODO: Add this back when 'getParser' issue (https://github.com/appium/appium/issues/11320) has been fixed
//export const ARG_DATA = ipcRenderer.sendSync('get-args-metadata');

const initialState = {
serverArgs: {...DEFAULT_ARGS},
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "appium-desktop",
"version": "1.6.3",
"version": "1.7.0",
"description": "Graphical interface for the Appium server, and an app inspector",
"repository": {
"type": "git",
Expand Down

0 comments on commit a976898

Please sign in to comment.