diff --git a/src/wt/hooks.lua b/src/wt/hooks.lua index 5ed86d57bbd66c59a7806c9fdb5f8b3336a20fc8..2ecfc08947d8cfae2a4262819268369454d68bf6 100644 --- a/src/wt/hooks.lua +++ b/src/wt/hooks.lua @@ -164,7 +164,13 @@ function M.run_hooks(source, target, hooks, root, home_override) end if hooks.run then for _, cmd in ipairs(hooks.run) do - local _, code = run_cmd("cd " .. target .. " && " .. cmd) + local output, code = run_cmd("cd " .. target .. " && " .. cmd) + if output ~= "" then + io.write(output) + if not output:match("\n$") then + io.write("\n") + end + end if code ~= 0 then io.stderr:write("warning: hook command failed: " .. cmd .. "\n") end