diff options
Diffstat (limited to 'src/luarocks/install.lua')
-rw-r--r-- | src/luarocks/install.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luarocks/install.lua b/src/luarocks/install.lua index c181d612..b28e6282 100644 --- a/src/luarocks/install.lua +++ b/src/luarocks/install.lua | |||
@@ -120,8 +120,8 @@ end | |||
120 | -- if returned a result, installs the matching rock. | 120 | -- if returned a result, installs the matching rock. |
121 | -- @param version string: When passing a package name, a version number | 121 | -- @param version string: When passing a package name, a version number |
122 | -- may also be given. | 122 | -- may also be given. |
123 | -- @return boolean or (nil, string): True if installation was | 123 | -- @return boolean or (nil, string, exitcode): True if installation was |
124 | -- successful, nil and an error message otherwise. | 124 | -- successful, nil and an error message otherwise. exitcode is optionally returned. |
125 | function run(...) | 125 | function run(...) |
126 | local flags, name, version = util.parse_flags(...) | 126 | local flags, name, version = util.parse_flags(...) |
127 | if type(name) ~= "string" then | 127 | if type(name) ~= "string" then |
@@ -129,7 +129,7 @@ function run(...) | |||
129 | end | 129 | end |
130 | 130 | ||
131 | local ok, err = fs.check_command_permissions(flags) | 131 | local ok, err = fs.check_command_permissions(flags) |
132 | if not ok then return nil, err end | 132 | if not ok then return nil, err, cfg.errorcodes.PERMISSIONDENIED end |
133 | 133 | ||
134 | if name:match("%.rockspec$") or name:match("%.src%.rock$") then | 134 | if name:match("%.rockspec$") or name:match("%.src%.rock$") then |
135 | util.printout("Using "..name.."... switching to 'build' mode") | 135 | util.printout("Using "..name.."... switching to 'build' mode") |