diff options
author | ncshaw <ncshaw@ibm.com> | 2021-08-27 15:58:25 -0400 |
---|---|---|
committer | Nick Vatamaniuc <nickva@users.noreply.github.com> | 2021-08-27 17:06:44 -0400 |
commit | 9716f88ef164941cc165e3612c4ad7337de70f43 (patch) | |
tree | b08b04a751361a5c62d587dc7279525a68c46e9d | |
parent | e83935c7f8c3e47b47f07f22ece327f6529d4da0 (diff) | |
download | couchdb-9716f88ef164941cc165e3612c4ad7337de70f43.tar.gz |
Merge keys from rebar.config
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | rebar.config.script | 9 | ||||
-rw-r--r-- | src/couch/.gitignore | 2 | ||||
-rw-r--r-- | src/couch/rebar.config.script | 7 |
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). |