Delete plugins marked for uninstall

This commit is contained in:
Rene Pfeuffer
2019-09-16 14:27:56 +02:00
parent 38f05fe689
commit 7ec2b0c31d
3 changed files with 29 additions and 3 deletions

View File

@@ -39,7 +39,6 @@ import com.google.inject.Singleton;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sonia.scm.NotFoundException;
import sonia.scm.ScmConstraintViolationException;
import sonia.scm.event.ScmEventBus;
import sonia.scm.lifecycle.RestartEvent;
import sonia.scm.version.Version;
@@ -193,7 +192,7 @@ public class DefaultPluginManager implements PluginManager {
dependencyTracker.removeInstalled(installed.getDescriptor());
try {
Files.createFile(installed.getDirectory().resolve("uninstall"));
Files.createFile(installed.getDirectory().resolve(InstalledPlugin.UNINSTALL_MARKER_FILENAME));
} catch (IOException e) {
throw new PluginException("could not mark plugin " + name + " in path " + installed.getDirectory() + " for uninstall", e);
}