diff options
| author | ruki <[email protected]> | 2019-05-11 00:42:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-05-10 22:13:29 +0800 |
| commit | ffa81cffcd6788d70b05a96cd5cc9ab2bbc52ce5 (patch) | |
| tree | f3aed645a033b2b6d7c4737d776eb6e6cfd5d7fe /xmake/actions/require/impl/action | |
| parent | 788106769627016f41c510e23212a54039d8bb32 (diff) | |
improve force and shallow to require package
Diffstat (limited to 'xmake/actions/require/impl/action')
| -rw-r--r-- | xmake/actions/require/impl/action/download.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/actions/require/impl/action/download.lua b/xmake/actions/require/impl/action/download.lua index 699d3a063..15a5d3570 100644 --- a/xmake/actions/require/impl/action/download.lua +++ b/xmake/actions/require/impl/action/download.lua @@ -47,7 +47,7 @@ function _checkout(package, url, sourcedir, url_alias) -- use previous source directory if exists local packagedir = path.join(sourcedir, package:name()) - if os.isdir(packagedir) and (not option.get("force") or option.get("shallow")) then + if os.isdir(packagedir) then -- clean the previous build files git.clean({repodir = packagedir, force = true}) @@ -96,7 +96,7 @@ function _download(package, url, sourcedir, url_alias, url_excludes) -- the package file have been downloaded? local cached = true - if (option.get("force") and not option.get("shallow")) or not os.isfile(packagefile) or sourcehash ~= hash.sha256(packagefile) then + if not os.isfile(packagefile) or sourcehash ~= hash.sha256(packagefile) then -- no cached cached = false |
