[Groonga-commit] groonga/gcs [master] Change priority of the port number: --port option > --base-host option > default value

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Oct 22 10:55:28 JST 2012


YUKI Hiroshi	2012-10-22 10:55:28 +0900 (Mon, 22 Oct 2012)

  New Revision: 12d704e3415b7958d218f1ba1bd6ad13352298a4
  https://github.com/groonga/gcs/commit/12d704e3415b7958d218f1ba1bd6ad13352298a4

  Log:
    Change priority of the port number: --port option > --base-host option > default value

  Modified files:
    lib/command-line.js

  Modified: lib/command-line.js (+2 -2)
===================================================================
--- lib/command-line.js    2012-10-22 10:53:24 +0900 (ee8ea2f)
+++ lib/command-line.js    2012-10-22 10:55:28 +0900 (3180498)
@@ -32,7 +32,7 @@ CommandLineInterface.prototype = {
     return this.options.baseHost.split(':')[0];
   },
   get port() {
-    return this.options.port || this.options.baseHost.split(':')[1];
+    return this.options.port || Number(this.options.baseHost.split(':')[1] || 0) || defaultPort;
   },
 
   get options() {
@@ -57,7 +57,7 @@ CommandLineInterface.prototype = {
                 '(GCS_PORT) ' +
                 '[' + defaultPort + ']',
               Number,
-              defaultPort)
+              0)
       .option('--base-host <hostname>',
               'The base host name assigned to the service ' +
                 '(GCS_BASE_HOST) ' +
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index