diff options
| -rw-r--r-- | xmake/actions/require/impl/action/download.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/actions/require/impl/action/download.lua b/xmake/actions/require/impl/action/download.lua index ab586c4bc..a7b222009 100644 --- a/xmake/actions/require/impl/action/download.lua +++ b/xmake/actions/require/impl/action/download.lua @@ -47,7 +47,8 @@ function _checkout(package, url, sourcedir, url_alias) -- use previous source directory if exists local packagedir = path.join(sourcedir, package:name()) - if os.isdir(packagedir) then + if os.isdir(packagedir) and + not (option.get("force") and package:branch()) then -- we need disable cache if we force to clone from the given branch -- clean the previous build files git.clean({repodir = packagedir, force = true}) |
