PluginHandle pluginHandle = PluginHandle.parse(name);
checkForForbiddenName(pluginHandle.name);
Path pluginFile = pluginHandle.distroFile(environment);
final Path extractLocation = pluginHandle.extractedDir(environment);
if (Files.exists(extractLocation)) {
<BUG>throw new IOException("plugin directory " + extractLocation.toAbsolutePath() + " already exists. To update the plugin, uninstall it first using --remove " + name + " command");
}</BUG>
if (url != null) {
URL pluginUrl = new URL(url);
<BUG>log("Trying " + pluginUrl.toExternalForm() + "...");
try {</BUG>
downloadHelper.download(pluginUrl, pluginFile, progress, this.timeout);

PluginHandle pluginHandle = PluginHandle.parse(name);
checkForForbiddenName(pluginHandle.name);
Path pluginFile = pluginHandle.distroFile(environment);
final Path extractLocation = pluginHandle.extractedDir(environment);
if (Files.exists(extractLocation)) {
throw new IOException("plugin directory " + extractLocation.toAbsolutePath() + " already exists. To update the plugin, uninstall it first using remove " + name + " command");
}
if (url != null) {
URL pluginUrl = new URL(url);
terminal.println("Trying %s ...", pluginUrl.toExternalForm());
try {
downloadHelper.download(pluginUrl, pluginFile, progress, this.timeout);
