diff options
| -rw-r--r-- | xmake/actions/global/xmake.lua | 1 | ||||
| -rw-r--r-- | xmake/core/package/package.lua | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/xmake/actions/global/xmake.lua b/xmake/actions/global/xmake.lua index 224bf06fd..ab8fa1366 100644 --- a/xmake/actions/global/xmake.lua +++ b/xmake/actions/global/xmake.lua @@ -76,6 +76,7 @@ task("global") {nil, "pkg_searchdirs", "kv", nil , "The search directories of the remote package." , " e.g." , " - xmake g --pkg_searchdirs=/dir1" .. path.envsep() .. "/dir2"}, + {nil, "pkg_cachedir", "kv", nil , "The cache root directory of the remote package."}, {nil, "pkg_installdir", "kv", nil , "The install root directory of the remote package."}, -- show platform menu options diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 08a6846a7..94dd88b61 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -2054,7 +2054,7 @@ function package.cachedir(opt) opt = opt or {} local cachedir = package._CACHEDIR if not cachedir then - cachedir = os.getenv("XMAKE_PKG_CACHEDIR") or path.join(global.cachedir(), "packages") + cachedir = os.getenv("XMAKE_PKG_CACHEDIR") or global.get("pkg_cachedir") or path.join(global.cachedir(), "packages") package._CACHEDIR = cachedir end if opt.rootonly then |
