summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-09-19 00:49:34 +0800
committerruki <[email protected]>2019-09-18 22:57:25 +0800
commitbb3455b845e0b776937283b3ddae4ae557eea52e (patch)
tree7625b08ec58620e048410017bfe18ff3fa536548 /xmake/core/package/package.lua
parent916078fdb2904340ef2003a46057d9232194511a (diff)
improve template
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua15
1 files changed, 3 insertions, 12 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index bfc742087..8fa4b63b9 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -1145,10 +1145,7 @@ function package.load_from_system(packagename)
end
-- new an instance
- local instance, errors = _instance.new(packagename, scopeinfo.new("package", packageinfo))
- if not instance then
- return nil, errors
- end
+ local instance = _instance.new(packagename, scopeinfo.new("package", packageinfo))
-- mark as system or 3rd package
instance._isSys = true
@@ -1195,10 +1192,7 @@ function package.load_from_project(packagename, project)
end
-- new an instance
- local instance, errors = _instance.new(packagename, packages[packagename])
- if not instance then
- return nil, errors
- end
+ local instance = _instance.new(packagename, packages[packagename])
-- save instance to the cache
package._PACKAGES[packagename] = instance
@@ -1259,10 +1253,7 @@ function package.load_from_repository(packagename, repo, packagedir, packagefile
end
-- new an instance
- local instance, errors = _instance.new(packagename, packageinfo, path.directory(scriptpath))
- if not instance then
- return nil, errors
- end
+ local instance = _instance.new(packagename, packageinfo, path.directory(scriptpath))
-- save repository
instance._REPO = repo