summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorncshaw <ncshaw@ibm.com>2021-08-27 15:58:25 -0400
committerNick Vatamaniuc <nickva@users.noreply.github.com>2021-08-27 17:06:44 -0400
commit9716f88ef164941cc165e3612c4ad7337de70f43 (patch)
treeb08b04a751361a5c62d587dc7279525a68c46e9d
parente83935c7f8c3e47b47f07f22ece327f6529d4da0 (diff)
downloadcouchdb-9716f88ef164941cc165e3612c4ad7337de70f43.tar.gz
Merge keys from rebar.config
-rw-r--r--.gitignore1
-rw-r--r--rebar.config.script9
-rw-r--r--src/couch/.gitignore2
-rw-r--r--src/couch/rebar.config.script7
4 files changed, 16 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index d9f0d50a2..3d49a336e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,6 +32,7 @@ ebin/
erl_crash.dump
erln8.config
install.mk
+rebar.config
rel/*.config
rel/couchdb
rel/dev*
diff --git a/rebar.config.script b/rebar.config.script
index 52b9d99d7..cbf87e708 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -215,6 +215,11 @@ AddConfig = [
{post_hooks, [{compile, "escript support/build_js.escript"}]}
].
-C = lists:foldl(fun({K, V}, CfgAcc) ->
- lists:keystore(K, 1, CfgAcc, {K, V})
+lists:foldl(fun({K, V}, CfgAcc) ->
+ case lists:keyfind(K, 1, CfgAcc) of
+ {K, Existent} when is_list(Existent) andalso is_list(V) ->
+ lists:keystore(K, 1, CfgAcc, {K, Existent ++ V});
+ false ->
+ lists:keystore(K, 1, CfgAcc, {K, V})
+ end
end, CONFIG, AddConfig).
diff --git a/src/couch/.gitignore b/src/couch/.gitignore
index e1fa65333..861974adb 100644
--- a/src/couch/.gitignore
+++ b/src/couch/.gitignore
@@ -19,3 +19,5 @@ test/engines/log/
.rebar/
.eunit
+
+rebar.config
diff --git a/src/couch/rebar.config.script b/src/couch/rebar.config.script
index b03d70d5c..d1b4dbc84 100644
--- a/src/couch/rebar.config.script
+++ b/src/couch/rebar.config.script
@@ -236,5 +236,10 @@ AddConfig = [
].
lists:foldl(fun({K, V}, CfgAcc) ->
- lists:keystore(K, 1, CfgAcc, {K, V})
+ case lists:keyfind(K, 1, CfgAcc) of
+ {K, Existent} when is_list(Existent) andalso is_list(V) ->
+ lists:keystore(K, 1, CfgAcc, {K, Existent ++ V});
+ false ->
+ lists:keystore(K, 1, CfgAcc, {K, V})
+ end
end, CONFIG, AddConfig).