diff options
| author | ruki <[email protected]> | 2020-04-23 22:41:05 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-23 10:06:32 +0800 |
| commit | d41e6aeb8aa516742895d64f36025db50e8f857f (patch) | |
| tree | 6e791fa39be295ccfa59503a372a9a7e6f83c5e4 /xmake/core/main.lua | |
| parent | ceff124c76b8968b0009066c6fcf03a6f31fb180 (diff) | |
improve programdir
Diffstat (limited to 'xmake/core/main.lua')
| -rw-r--r-- | xmake/core/main.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/core/main.lua b/xmake/core/main.lua index 5da559fc1..11dd59ec8 100644 --- a/xmake/core/main.lua +++ b/xmake/core/main.lua @@ -179,6 +179,10 @@ function main._init() if os.isdir(os.projectdir()) then os.cd(os.projectdir()) end + else + -- patch a fake project file and directory for other lua programs with xmake/engine + xmake._PROJECT_DIR = path.join(os.tmpdir(), "local") + xmake._PROJECT_FILE = path.join(xmake._PROJECT_DIR, xmake._NAME .. ".lua") end -- add the directory of the program file (xmake) to $PATH environment |
