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/f60e1d40 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-setup/tree/f60e1d40 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-setup/diff/f60e1d40 Branch: refs/heads/wizard-admin.party Commit: f60e1d400261b698bbf977ff9aa470ea05132c05 Parents: 5fb322c Author: Robert Kowalski <robertkowal...@apache.org> Authored: Thu Sep 10 21:08:39 2015 +0200 Committer: Robert Newson <rnew...@apache.org> Committed: Mon Sep 14 12:40:54 2015 +0100 ---------------------------------------------------------------------- src/setup.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/f60e1d40/src/setup.erl ---------------------------------------------------------------------- diff --git a/src/setup.erl b/src/setup.erl index 2bc55dd..cf7570a 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("chttpd", "port", integer_to_list(Port)) + Port when is_binary(Port) -> + config:set("chttpd", "port", binary_to_list(Port)); + Port when is_integer(Port) -> + config:set_integer("chttpd", "port", Port) end, couch_log:notice("Enable Cluster: ~p~n", [Options]). %cluster_state:set(enabled).