diff options
| author | ruki <[email protected]> | 2018-11-11 14:38:58 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-11-11 14:38:58 +0800 |
| commit | 7d5215f5807e37a23d350aaa11fc1e1b6464bd7e (patch) | |
| tree | faecf2918f19e8dce5a9831871485cfd450bd4cb /xmake/actions/require/impl | |
| parent | c6f8926ba3ed2557ddd66a6b03436a34a2aeb90b (diff) | |
impl xmake update on windows
Diffstat (limited to 'xmake/actions/require/impl')
| -rw-r--r-- | xmake/actions/require/impl/package.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua index 89d39d5be..814378276 100644 --- a/xmake/actions/require/impl/package.lua +++ b/xmake/actions/require/impl/package.lua @@ -172,7 +172,9 @@ function _load_package(packagename, requireinfo) end -- load package from project first - package = _load_package_from_project(packagename) + if os.isfile(os.projectfile()) then + package = _load_package_from_project(packagename) + end -- load package from repositories if not package then @@ -242,7 +244,7 @@ function _load_packages(requires, opt) for packagename, requireinfo in pairs(load_requires(requires, opt.requires_extra, opt.parentinfo)) do -- attempt to get project option about this package - local packageopt = project.option(packagename) + local packageopt = os.isfile(os.projectfile()) and project.option(packagename) or nil if packageopt == nil or packageopt:enabled() then -- this package is enabled? -- load package package |
