Browse Source

fix again

xq114 4 years ago
parent
commit
76acc1799a
1 changed files with 3 additions and 3 deletions
  1. 3 3
      packages/t/tbb/fetch.lua

+ 3 - 3
packages/t/tbb/fetch.lua

@@ -52,12 +52,12 @@ function main(package, opt)
         local result
         if package:is_plat("windows") then
             result = _find_package_on_windows(package, opt)
+            if opt.require_version and result and result.version and not semver.satisfies(result.version, opt.require_version) then
+                result = nil
+            end
         else
             result = package:find_package("tbb", opt)
         end
-        if opt.require_version and result.version and not semver.satisfies(result.version, opt.require_version) then
-            result = nil
-        end
         return result or false
     end
 end