summaryrefslogtreecommitdiff
path: root/xmake/modules/package/manager/install_package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-09-25 00:33:07 +0800
committerruki <[email protected]>2020-09-25 00:33:07 +0800
commit90af4956738036172984f068502624bbc515cae7 (patch)
tree7cd7177becaf98e676ae8eaa478f042e14505d3a /xmake/modules/package/manager/install_package.lua
parent700f08a7bae11c22295f884610f98b7b99eb1790 (diff)
fix trailing white-space
Diffstat (limited to 'xmake/modules/package/manager/install_package.lua')
-rw-r--r--xmake/modules/package/manager/install_package.lua20
1 files changed, 10 insertions, 10 deletions
diff --git a/xmake/modules/package/manager/install_package.lua b/xmake/modules/package/manager/install_package.lua
index 08ccdeab9..96d793763 100644
--- a/xmake/modules/package/manager/install_package.lua
+++ b/xmake/modules/package/manager/install_package.lua
@@ -11,7 +11,7 @@
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
---
+--
-- Copyright (C) 2015-2020, TBOOX Open Source Group.
--
-- @author ruki
@@ -21,13 +21,13 @@
-- imports
import("core.project.config")
--- install package
+-- install package
function _install_package(manager_name, package_name, opt)
-- get managers
if manager_name then
dprint("installing %s from %s ..", package_name, manager_name)
- return import("package.manager." .. manager_name .. ".install_package", {anonymous = true})(package_name, opt)
+ return import("package.manager." .. manager_name .. ".install_package", {anonymous = true})(package_name, opt)
end
-- get suitable package managers
@@ -53,13 +53,13 @@ function _install_package(manager_name, package_name, opt)
dprint("installing %s from %s ..", package_name, manager)
-- try to install it
- local ok = try
- {
- function ()
- import("package.manager." .. manager .. ".install_package", {anonymous = true})(package_name, opt)
+ local ok = try
+ {
+ function ()
+ import("package.manager." .. manager .. ".install_package", {anonymous = true})(package_name, opt)
return true
end,
- catch
+ catch
{
function (errs)
errors = errs
@@ -70,7 +70,7 @@ function _install_package(manager_name, package_name, opt)
-- install ok?
if ok then
dprint("install %s ok from %s", package_name, manager)
- return
+ return
end
end
@@ -106,5 +106,5 @@ function main(name, opt)
opt.version = require_version or opt.version
-- do install package
- _install_package(manager_name, package_name, opt)
+ _install_package(manager_name, package_name, opt)
end