From 22ee7732c80f018cf6f2a2943ec36b2f4fe4dadd Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 11 May 2019 00:30:54 +0800 Subject: add shallow args for require --- xmake/actions/require/impl/package.lua | 2 +- xmake/actions/require/xmake.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua index b43e19280..10d71974f 100644 --- a/xmake/actions/require/impl/package.lua +++ b/xmake/actions/require/impl/package.lua @@ -362,7 +362,7 @@ function _load_packages(requires, opt) if package then -- load dependent packages and save them first of this package - if not package._DEPS then + if not package._DEPS and not option.get("shallow") then local deps = package:get("deps") if deps and opt.nodeps ~= true then local packagedeps = {} diff --git a/xmake/actions/require/xmake.lua b/xmake/actions/require/xmake.lua index e85aeb6ac..d612cc231 100644 --- a/xmake/actions/require/xmake.lua +++ b/xmake/actions/require/xmake.lua @@ -46,6 +46,7 @@ task("require") " $ xmake require --clean", " $ xmake require --clean zlib tbox pcr*" } , {'f', "force", "k", nil, "Force to reinstall all package dependencies." } + , {nil, "shallow", "k", nil, "Only install the root packages." } , {'l', "list", "k", nil, "List all package dependencies in project.", "e.g.", " $ xmake require --list" } -- cgit v1.3.1