[Groonga-commit] groonga/gcs [master] Don't raise error even if no --endpoint is given

アーカイブの一覧に戻る

YUKI Hiroshi null+****@clear*****
Wed Dec 5 12:49:17 JST 2012


YUKI Hiroshi	2012-12-05 12:49:17 +0900 (Wed, 05 Dec 2012)

  New Revision: b8cafcce6ecc471a4f54f76ac38793127e0d9f35
  https://github.com/groonga/gcs/commit/b8cafcce6ecc471a4f54f76ac38793127e0d9f35

  Log:
    Don't raise error even if no --endpoint is given

  Modified files:
    lib/command-line.js

  Modified: lib/command-line.js (+2 -2)
===================================================================
--- lib/command-line.js    2012-12-04 16:10:51 +0900 (6c558f4)
+++ lib/command-line.js    2012-12-05 12:49:17 +0900 (56ce6c0)
@@ -37,11 +37,11 @@ CommandLineInterface.prototype = {
     return this.options.domainName;
   },
   get host() {
-    return this.options.endpoint.split(':')[0];
+    return (this.options.endpoint || '').split(':')[0] || 'localhost';
   },
   get port() {
     return this.options.port ||
-           Number(this.options.endpoint.split(':')[1] || 0) ||
+           Number((this.options.endpoint || '').split(':')[1] || 0) ||
            defaultPort;
   },
 
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る