diff options
| author | ruki <[email protected]> | 2023-02-04 20:39:27 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-02-04 20:40:44 +0800 |
| commit | a5d26d70d99ff52a532dd37c80c434b38b792467 (patch) | |
| tree | d93261b4c38e4b3db7f11944061e50cbd919693b | |
| parent | 2301d3426456ef56abb11c5f65f2b430ecc87369 (diff) | |
improve package version #3333
| -rw-r--r-- | xmake/core/package/package.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 078e7d534..15cfcd117 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -1712,6 +1712,16 @@ function _instance:fetch(opt) -- save to cache self._FETCHINFO = fetchinfo + -- we need update the real version if it's system package + -- @see https://github.com/xmake-io/xmake/issues/3333 + if is_system and fetchinfo and fetchinfo.version then + local fetch_version = semver.new(fetchinfo.version) + if fetch_version then + self._VERSION = fetch_version + self._VERSION_STR = fetchinfo.version + end + end + -- mark as system package? if is_system ~= nil then self._is_system = is_system |
