CB-11982 : updated config command if save, fetch, or browserify is undefined
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/c6286f2c Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/c6286f2c Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/c6286f2c Branch: refs/heads/master Commit: c6286f2cc6afd2b89d61087e290284a77da7da09 Parents: 8956c75 Author: Audrey So <[email protected]> Authored: Wed Feb 1 17:36:39 2017 -0800 Committer: Steve Gill <[email protected]> Committed: Wed Apr 19 14:34:21 2017 -0700 ---------------------------------------------------------------------- package.json | 5 +++-- src/cli.js | 13 +++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/c6286f2c/package.json ---------------------------------------------------------------------- diff --git a/package.json b/package.json index c2bb5b3..57f5108 100644 --- a/package.json +++ b/package.json @@ -31,12 +31,13 @@ "cli" ], "dependencies": { + "configstore": "2.1.0", "cordova-common": "2.0.2", "cordova-lib": "6.5.0", - "insight": "~0.8.2", + "insight": "0.8.2", "nopt": "3.0.1", "q": "1.0.1", - "update-notifier": "^0.5.0" + "update-notifier": "0.5.0" }, "devDependencies": { "jasmine": "^2.5.2", http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/c6286f2c/src/cli.js ---------------------------------------------------------------------- diff --git a/src/cli.js b/src/cli.js index c33c5da..f52a51f 100644 --- a/src/cli.js +++ b/src/cli.js @@ -423,6 +423,19 @@ function cli(inputArgs) { args.save = true; } + if (args.save === undefined) { + // User explicitly did not pass in save + args.save = conf.get('autosave'); + } + if (args.fetch === undefined) { + // User explicitly did not pass in fetch + args.fetch = conf.get('fetch'); + } + if(args.browserify === undefined) { + // User explicitly did not pass in browserify + args.browserify = conf.get('browserify'); + } + var download_opts = { searchpath : args.searchpath , noregistry : args.noregistry , nohooks : args.nohooks --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
