summaryrefslogtreecommitdiffstats
path: root/db.lua
diff options
context:
space:
mode:
Diffstat (limited to 'db.lua')
-rw-r--r--db.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/db.lua b/db.lua
index 613bb95..6b61df1 100644
--- a/db.lua
+++ b/db.lua
@@ -147,7 +147,11 @@ export.listdatabases = function(dbobject)
cmd[#cmd+1] = "-p"
cmd[#cmd+1] = dbobject.port
end
+ cmd["stderr"]=subprocess.STDOUT
local code, cmdresult = subprocess.call_capture(cmd)
+ if code ~= 0 then
+ error(cmdresult, 0)
+ end
for line in string.gmatch(cmdresult or "", "[^\n]+") do
local table = string.match(line, "%s*([^ |]*)")
if table and table ~= "" then