From 99fe28c973294b9a971256bea191ff160671c790 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 8 Apr 2017 14:11:16 +0100 Subject: 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. --- bin/gitano-setup.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bin') 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)) -- cgit v1.2.1