diff options
| author | ruki <[email protected]> | 2020-07-24 00:49:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-07-24 00:49:35 +0800 |
| commit | 3ad0524f1c963c974741285b633157f3f28718db (patch) | |
| tree | d23fe0e502ed0f46ba9734989c02551ae07aa2e7 | |
| parent | 507acf17452ecfbf6f386fad5a25f97c99b46e66 (diff) | |
add errors for project lock
| -rw-r--r-- | xmake/core/project/project.lua | 5 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/project/project.lua | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index 9ec7bc0bf..0fd4816e6 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -808,12 +808,13 @@ end -- get the filelock of the whole project directory function project.filelock() + local errors local filelock = project._FILELOCK if filelock == nil then - filelock = io.openlock(path.join(config.directory(), "project.lock")) + filelock, errors = io.openlock(path.join(config.directory(), "project.lock")) project._FILELOCK = filelock end - return filelock + return filelock, errors end -- get the project info from the given name diff --git a/xmake/core/sandbox/modules/import/core/project/project.lua b/xmake/core/sandbox/modules/import/core/project/project.lua index 1ea9c96b5..4bd9b2440 100644 --- a/xmake/core/sandbox/modules/import/core/project/project.lua +++ b/xmake/core/sandbox/modules/import/core/project/project.lua @@ -144,9 +144,9 @@ end -- get the filelock of the whole project directory function sandbox_core_project.filelock() - local filelock = project.filelock() + local filelock, errors = project.filelock() if not filelock then - raise("cannot create the project lock!") + raise("cannot create the project lock, %s!", errors or "unknown errors") end return filelock end |
