summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-01-19 12:11:42 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-01-19 12:11:42 +0000
commitaab70777f26e52216f64024612baaed58b394653 (patch)
tree4807eefa638392bcf3514fcfca5caa7c1c03abe9 /lib
parent3efe5baa9e56db0c8ecdcdef623c4604abbf0397 (diff)
downloadgitano-aab70777f26e52216f64024612baaed58b394653.tar.gz
Ensure that config show will fail if none of the keys supplied are found
Diffstat (limited to 'lib')
-rw-r--r--lib/gitano/command.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/gitano/command.lua b/lib/gitano/command.lua
index e7a61cb..4070338 100644
--- a/lib/gitano/command.lua
+++ b/lib/gitano/command.lua
@@ -537,6 +537,15 @@ local function builtin_config_run(conf, repo, cmdline, env)
end
log.stdout(key .. ": " .. value)
end
+ if #slist == 0 then
+ local keys = {}
+ for i = 4, #cmdline do
+ keys[#keys+1] = "'" .. cmdline[i] .. "'"
+ end
+ keys = table.concat(keys, ", ")
+ log.error("Configuration keys not found: " .. keys)
+ return "exit", 1
+ end
elseif cmdline[3] == "set" then
local key, value = cmdline[4], cmdline[5]
local vtype, rest = value:match(pattern.CONF_SET_TYPE_PREFIX)