diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2017-04-08 14:11:16 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2017-04-08 14:11:16 +0100 |
commit | 99fe28c973294b9a971256bea191ff160671c790 (patch) | |
tree | 46e43cf5776c509f00c721af6dddb6b8f2c1520a /bin | |
parent | 14b50b9543181de6bf154dcf0edb385616506bbc (diff) | |
download | gitano-99fe28c973294b9a971256bea191ff160671c790.tar.gz |
fixes gitano-setup to read all answer files
Ensure that when we loop through the answer files, we actually
read all of them, not just the first.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/gitano-setup.in | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/gitano-setup.in b/bin/gitano-setup.in index 8363730..9e6bfaa 100644 --- a/bin/gitano-setup.in +++ b/bin/gitano-setup.in @@ -61,9 +61,11 @@ gitano.log.set_prefix("gitano-setup") gitano.log.bump_level(gitano.log.level.CHAT) for i = #possible_answers, 1, -1 do - gitano.log.debug(gitano.i18n.expand("SETUP_DEBUG_PARSING_ANSWERS", { file=possible_answers[1] })) - local one_conf = assert(clod.parse(assert(io.open(possible_answers[1], "r")):read "*a", - "@" .. possible_answers[1])) + local answer_file = possible_answers[i] + gitano.log.debug(gitano.i18n.expand("SETUP_DEBUG_PARSING_ANSWERS", { file=answer_file })) + local file_content = assert(io.open(answer_file, "r")):read "*a" + local file_name = "@" .. answer_file + local one_conf = assert(clod.parse(file_content, file_name)) gitano.log.debug(gitano.i18n.expand("SETUP_DEBUG_COMBINE_ANSWERS")) for k,v in one_conf:each() do gitano.log.ddebug(tostring(k) .. " = " .. tostring(v)) |