You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2015/09/10 21:12:14 UTC

[2/2] couchdb-setup git commit: fix badarg error

fix badarg error


Project: http://git-wip-us.apache.org/repos/asf/couchdb-setup/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-setup/commit/20ac682c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-setup/tree/20ac682c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-setup/diff/20ac682c

Branch: refs/heads/wizard-admin.party
Commit: 20ac682c00d9ef5039c31370b2784067f19da070
Parents: 2d3da67
Author: Robert Kowalski <ro...@apache.org>
Authored: Thu Sep 10 21:08:39 2015 +0200
Committer: Robert Kowalski <ro...@apache.org>
Committed: Thu Sep 10 21:08:39 2015 +0200

----------------------------------------------------------------------
 src/setup.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/20ac682c/src/setup.erl
----------------------------------------------------------------------
diff --git a/src/setup.erl b/src/setup.erl
index aa2da56..91c7ed3 100644
--- a/src/setup.erl
+++ b/src/setup.erl
@@ -147,8 +147,10 @@ enable_cluster_int(Options, no) ->
     case Port of
         undefined ->
             ok;
-        Port ->
-            config:set("httpd", "port", integer_to_list(Port))
+        Port when is_binary(Port) ->
+            config:set("httpd", "port", binary_to_list(Port));
+        Port when is_integer(Port) ->
+            config:set_integer("httpd", "port", Port)
     end,
     couch_log:notice("Enable Cluster: ~p~n", [Options]).
     %cluster_state:set(enabled).