summaryrefslogtreecommitdiff
path: root/xmake/actions/run/main.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-06-06 00:34:00 +0800
committerruki <[email protected]>2019-06-05 21:24:01 +0800
commit783dce4adabedce2062a90f3231e2b2f7e4942e2 (patch)
tree0471a45b0173a9a6f697c4cc5906a38708fcff39 /xmake/actions/run/main.lua
parent06dba0daf4968b9632ebc00a9018c6af044422df (diff)
add target.set_rundir api
Diffstat (limited to 'xmake/actions/run/main.lua')
-rw-r--r--xmake/actions/run/main.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/actions/run/main.lua b/xmake/actions/run/main.lua
index ae5bf997e..aab49ad50 100644
--- a/xmake/actions/run/main.lua
+++ b/xmake/actions/run/main.lua
@@ -32,14 +32,14 @@ import("devel.debugger")
function _do_run_target(target)
if target:targetkind() == "binary" then
- -- get the work directory of target
- local workdir = option.get("workdir") or path.directory(target:targetfile())
+ -- get the run directory of target
+ local rundir = target:rundir()
-- get the absolute target file path
local targetfile = path.absolute(target:targetfile())
- -- enter the work directory
- local oldir = os.cd(workdir)
+ -- enter the run directory
+ local oldir = os.cd(rundir)
-- add search directories for all dependent shared libraries on windows
if is_plat("windows") or (is_plat("mingw") and is_host("windows")) then