Skip to content

Commit

Permalink
fixes bug
Browse files Browse the repository at this point in the history
  • Loading branch information
actboy168 committed Feb 26, 2024
1 parent da105a8 commit 5602232
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
17 changes: 10 additions & 7 deletions scripts/action.lua
Expand Up @@ -26,15 +26,12 @@ local function execute(option)
end
process.stdout:close()
end
local code = process:wait()
if code ~= 0 then
os.exit(code)
end
return process:wait()
end

local function ninja(args)
args[1] = { "ninja", "-f", globals.builddir.."/build.ninja", args[1] }
execute(args)
return execute(args)
end

local function init()
Expand Down Expand Up @@ -70,11 +67,17 @@ local function build()
})
end
end
ninja { arguments.targets, options }
local code = ninja { arguments.targets, options }
if code ~= 0 then
os.exit(code)
end
end

local function clean()
ninja { "-t", "clean" }
local code = ninja { "-t", "clean" }
if code ~= 0 then
os.exit(code)
end
end

if globals.perf then
Expand Down
5 changes: 4 additions & 1 deletion scripts/command/shell.lua
@@ -1,4 +1,7 @@
local action = require "action"

action.init()
action.execute { table.unpack(arg, 2) }
local code = action.execute { table.unpack(arg, 2) }
if code ~= 0 then
os.exit(code)
end

0 comments on commit 5602232

Please sign in to comment.