Comparison

prosodyctl @ 10149:0a24d886734a

prosodyctl: Corrected output printed by the remove command
author João Duarte <jvsDuarte08@gmail.com>
date Tue, 23 Jul 2019 07:21:08 -0700
parent 10147:1a35b3a2b11b
child 10150:baded8cd7da3
comparison
equal deleted inserted replaced
10148:263b61d03d70 10149:0a24d886734a
149 end 149 end
150 local flag = "--tree=" 150 local flag = "--tree="
151 -- I'm considering the flag is the first, but there can be many flags 151 -- I'm considering the flag is the first, but there can be many flags
152 if arg[1] and arg[1]:sub(1, #flag) == flag then 152 if arg[1] and arg[1]:sub(1, #flag) == flag then
153 local dir = arg[1]:match("=(.+)$") 153 local dir = arg[1]:match("=(.+)$")
154 print("Removing module "..arg[2].." at "..dir..", from luarocks repo") 154 print("Removing module "..arg[2].." at "..dir)
155 -- These extra double brackets allow us to correctly process names with spaces 155 -- These extra double brackets allow us to correctly process names with spaces
156 os.execute("luarocks remove --tree='"..dir.."' "..arg[2]) 156 os.execute("luarocks remove --tree='"..dir.."' "..arg[2])
157 return 0; 157 return 0;
158 else 158 else
159 print("Removing "..arg[1].." from ./plugins") 159 print("Removing "..arg[1].." from "..prosody.paths.plugins)
160 os.execute("luarocks --tree='"..prosody.paths.plugins.."' remove "..arg[1]) 160 os.execute("luarocks --tree='"..prosody.paths.plugins.."' remove "..arg[1])
161 print("Done!") 161 print("Done!")
162 return 0; 162 return 0;
163 end 163 end
164 end 164 end