diff options
| author | ruki <[email protected]> | 2026-03-13 22:52:05 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-13 22:52:05 +0800 |
| commit | 737959ac2cb795665ccae272997cd0c85d9d5199 (patch) | |
| tree | 05f79037ab826b588530c79d426d1301443506a3 | |
| parent | 17442f8fa917430ccc95fb4cb0993ba64a06beb7 (diff) | |
improve vcpkg check
| -rw-r--r-- | xmake/modules/package/manager/vcpkg/install_package.lua | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/xmake/modules/package/manager/vcpkg/install_package.lua b/xmake/modules/package/manager/vcpkg/install_package.lua index 7c4141861..2c2c520f3 100644 --- a/xmake/modules/package/manager/vcpkg/install_package.lua +++ b/xmake/modules/package/manager/vcpkg/install_package.lua @@ -62,13 +62,15 @@ function _install_for_classic(vcpkg, name, opt) -- @see https://github.com/xmake-io/xmake/issues/7388 local basename = name:gsub("%[.-%]", "") if basename ~= name then - if vcpkg_utils.is_installed(vcpkg, basename, triplet) then - local confirm = utils.confirm({default = true, - description = format("%s:%s is already installed with other features, installing %s will rebuild it and its dependencies, continue?", basename, triplet, name)}) - if confirm then - table.insert(argv, "--recurse") - else - raise("install %s:%s cancelled!", name, triplet) + if not vcpkg_utils.is_installed(vcpkg, name, triplet) then + if vcpkg_utils.is_installed(vcpkg, basename, triplet) then + local confirm = utils.confirm({default = true, + description = format("%s:%s is already installed (possibly with different features). Installing %s will require a rebuild of it and its dependencies. Continue?", basename, triplet, name)}) + if confirm then + table.insert(argv, "--recurse") + else + raise("install %s:%s cancelled!", name, triplet) + end end end end |
