YUKI Hiroshi
null+****@clear*****
Tue Nov 4 18:46:15 JST 2014
YUKI Hiroshi 2014-11-04 18:46:15 +0900 (Tue, 04 Nov 2014) New Revision: 748b01d3f05a24fe3954c9c9b636cb7d45bf22ed https://github.com/droonga/droonga-http-server/commit/748b01d3f05a24fe3954c9c9b636cb7d45bf22ed Message: Rename option for correct meaning. --quiet => --no-prompt Modified files: bin/droonga-http-server-configure install.sh Modified: bin/droonga-http-server-configure (+11 -6) =================================================================== --- bin/droonga-http-server-configure 2014-11-04 18:39:08 +0900 (c02d49b) +++ bin/droonga-http-server-configure 2014-11-04 18:46:15 +0900 (23322c0) @@ -116,7 +116,7 @@ function ensureServiceStopped() { if (!running) return resolve(); - if (options.quiet) + if (options.noPrompt) return stopService().then(resolve); console.log('The droonga-http-server service is now running.'); @@ -167,8 +167,13 @@ function startService() { function parseOptionsSync() { options = require('../lib/server-options'); options = options - .add('--quiet', + .add('--no-prompt', 'Run with no prompt.') + .add('--quiet', + 'Same to --no-prompt. For backward compatibility.', + function(newValue) { + options.noPrompt = newValue; + }) .add('--reset-config', 'Regenerate the configuration file "droonga-http-server.yaml".') .define() @@ -185,7 +190,7 @@ function configFileExistsSync() { function confirmToReconfigure() { return Q.Promise(function(resolve, reject, notify) { - if (!options.quiet && !options.resetConfig) { + if (!options.noPrompt && !options.resetConfig) { promptly.confirm('Do you want the configuration file ' + '"droonga-http-server.yaml" to be regenerated? (y/N): ', { default: 'no', @@ -205,7 +210,7 @@ var configValues = {}; function setStringOption(name, message) { return Q.Promise(function(resolve, reject, notify) { - if (options.quiet) { + if (options.noPrompt) { configValues[name] = options[name]; resolve(); } @@ -223,7 +228,7 @@ function setStringOption(name, message) { function setIntegerOption(name, message) { return Q.Promise(function(resolve, reject, notify) { - if (options.quiet) { + if (options.noPrompt) { configValues[name] = options[name]; resolve(); } @@ -244,7 +249,7 @@ function setIntegerOption(name, message) { function setBooleanOption(name, message) { return Q.Promise(function(resolve, reject, notify) { - if (options.quiet) { + if (options.noPrompt) { configValues[name] = options[name]; resolve(); } Modified: install.sh (+1 -0) =================================================================== --- install.sh 2014-11-04 18:39:08 +0900 (a9dfbac) +++ install.sh 2014-11-04 18:46:15 +0900 (dab2b36) @@ -188,6 +188,7 @@ setup_configuration_directory() { echo "*******************************************************" fi + # we should use --no-prompt instead of --quiet, for droonga-http-server 1.0.9 and later. droonga-http-server-configure --quiet \ --droonga-engine-host-name=$ENGINE_HOST \ --droonga-engine-port=$ENGINE_PORT \ -------------- next part -------------- HTML����������������������������...Download