Software / code / prosody
Comparison
core/modulemanager.lua @ 11151:498b3ab49b9c
core.modulemanager: Fix error if installer path missing
Happens if run outside prosody. Noticed because because the storage
tests fail.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 11 Oct 2020 14:27:28 +0200 |
| parent | 11147:82d6c8e627b9 |
| child | 11287:b602dd3c4bbc |
comparison
equal
deleted
inserted
replaced
| 11150:0cfa36fa707e | 11151:498b3ab49b9c |
|---|---|
| 197 end | 197 end |
| 198 | 198 |
| 199 api_instance.path = err; | 199 api_instance.path = err; |
| 200 | 200 |
| 201 local custom_plugins = prosody.paths.installer; | 201 local custom_plugins = prosody.paths.installer; |
| 202 if err:sub(1, #custom_plugins+1) == custom_plugins.."/" then | 202 if custom_plugins and err:sub(1, #custom_plugins+1) == custom_plugins.."/" then |
| 203 -- Stage 1: Make it work (you are here) | 203 -- Stage 1: Make it work (you are here) |
| 204 -- Stage 2: Make it less hacky (TODO) | 204 -- Stage 2: Make it less hacky (TODO) |
| 205 local manifest = {}; | 205 local manifest = {}; |
| 206 local luarocks_path = custom_plugins.."/lib/luarocks/rocks-"..lua_version; | 206 local luarocks_path = custom_plugins.."/lib/luarocks/rocks-"..lua_version; |
| 207 local manifest_filename = luarocks_path.."/manifest"; | 207 local manifest_filename = luarocks_path.."/manifest"; |