summaryrefslogtreecommitdiff
path: root/xmake/core/main.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-05-24 14:32:08 +0800
committerruki <[email protected]>2017-05-24 14:32:08 +0800
commit7ef69739513b4b4431f6f683fe2a9d297658be02 (patch)
tree14fd2789a956cbcb79e1ea217541bfc6e75bd99e /xmake/core/main.lua
parent4e52205dc696ade5ba01c8d6ccf9831b59ad6196 (diff)
remove xmake variable
Diffstat (limited to 'xmake/core/main.lua')
-rw-r--r--xmake/core/main.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/core/main.lua b/xmake/core/main.lua
index cda338294..62800d2be 100644
--- a/xmake/core/main.lua
+++ b/xmake/core/main.lua
@@ -126,6 +126,14 @@ function main._init()
break
end
end
+
+ -- add the directory of the program file (xmake) to $PATH environment
+ local programfile = os.programfile()
+ if programfile and os.isfile(programfile) then
+ os.addenv("PATH", path.directory(programfile))
+ else
+ os.addenv("PATH", os.programdir())
+ end
end
-- the main function