diff options
| author | Chen Yufei <[email protected]> | 2022-03-16 11:03:53 +0800 |
|---|---|---|
| committer | Chen Yufei <[email protected]> | 2022-03-16 11:03:53 +0800 |
| commit | ea5c33fb86182032a59b88332b534d561c0c180d (patch) | |
| tree | 2b09cdf3d7a895b398f099763bf308f17d4a5457 | |
| parent | 4e7ef0824c74db2aa27c7230da129e91ef8a13f9 (diff) | |
Fix typo, code tweaks.
| -rw-r--r-- | xmake/modules/private/action/require/impl/actions/install.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/install.lua b/xmake/modules/private/action/require/impl/actions/install.lua index 81068a6e3..fb8abd6b4 100644 --- a/xmake/modules/private/action/require/impl/actions/install.lua +++ b/xmake/modules/private/action/require/impl/actions/install.lua @@ -101,8 +101,8 @@ end -- @see https://github.com/xmake-io/xmake/issues/1671 function _fix_paths_for_precompiled_package(package) -- Match to path like (string insides brackets is matched): - -- /home/user/.xmake[/pacakges/f/foo/9adc96bd69124211aad7dd58a36f02ce/]v1.0 - -- Replace path string before "packages" with local pacakge install + -- /home/user/.xmake[/packages/f/foo/9adc96bd69124211aad7dd58a36f02ce/]v1.0 + -- Replace path string before "packages" with local package install -- directory. -- Note: It's possible that package A references files in package B, thus we -- need to match against all possible package install paths. @@ -121,7 +121,7 @@ function _fix_paths_for_precompiled_package(package) if #splitinfo == 2 then result = path.join(prefix, mat, splitinfo[2]) elseif #splitinfo == 1 then - if value:sub(1, #mat) == mat then + if value:startswith(mat) then -- path begins with matched pattern: [/packages/f/foo/buildhash/]v1.0 result = path.join(prefix, value) else |
