diff options
| author | ruki <[email protected]> | 2021-10-27 22:45:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-10-27 22:45:11 +0800 |
| commit | cc80af774a9426d7775be165adb4aa00d8569ed6 (patch) | |
| tree | 96254ab6f35f35668f9cbefdf386b666e8865aaa /xmake/modules/package | |
| parent | c871e3f603c6022c16659cca61f8995f29b5275e (diff) | |
impl nimble/install_package
Diffstat (limited to 'xmake/modules/package')
| -rw-r--r-- | xmake/modules/package/manager/nimble/install_package.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xmake/modules/package/manager/nimble/install_package.lua b/xmake/modules/package/manager/nimble/install_package.lua index 57addc15a..b5ba21438 100644 --- a/xmake/modules/package/manager/nimble/install_package.lua +++ b/xmake/modules/package/manager/nimble/install_package.lua @@ -38,4 +38,16 @@ function main(name, opt) raise("nimble not found!") end + -- install the given package + local argv = {"install", "-y"} + if option.get("verbose") then + table.insert(argv, "--verbose") + end + local require_str = name + if opt.require_version and opt.require_version ~= "latest" and opt.require_version ~= "master" then + name = name .. "@" + name = name .. opt.require_version + end + table.insert(argv, name) + os.vrunv(nimble.program, argv) end |
