Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix setting of default values #436

Merged
merged 7 commits into from
Mar 30, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Avoid opts mutation in exec
  • Loading branch information
mykola-mokhnach committed Mar 29, 2019
commit aae93a13f2a2b43135f3453f71c0af99aaa6cdda
1 change: 1 addition & 0 deletions lib/tools/system-calls.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ systemCallMethods.adbExec = async function adbExec (cmd, opts = {}) {
throw new Error('You need to pass in a command to adbExec()');
}

opts = _.cloneDeep(opts);
// setting default timeout for each command to prevent infinite wait.
opts.timeout = opts.timeout || this.adbExecTimeout || DEFAULT_ADB_EXEC_TIMEOUT;
opts.timeoutCapName = opts.timeoutCapName || 'adbExecTimeout'; // For error message
Expand Down