--list-plugins should not start init step

Init step should exit after showing list of avaliable plugins.

Change-Id: I013c24631de2faa9eb14985e9662807e30ca5fb7
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
This commit is contained in:
Dariusz Luksza
2013-10-18 12:27:11 +02:00
parent 757f88ae0d
commit c8bc8c4a90
2 changed files with 8 additions and 3 deletions

View File

@@ -75,7 +75,9 @@ public class BaseInit extends SiteProgram {
@Override
public int run() throws Exception {
final SiteInit init = createSiteInit();
beforeInit(init);
if (beforeInit(init)) {
return 0;
}
init.flags.autoStart = getAutoStart() && init.site.isNew;
init.flags.skipPlugins = skipPlugins();
@@ -108,7 +110,8 @@ public class BaseInit extends SiteProgram {
return false;
}
protected void beforeInit(SiteInit init) throws Exception {
protected boolean beforeInit(SiteInit init) throws Exception {
return false;
}
protected void afterInit(SiteRun run) throws Exception {

View File

@@ -76,7 +76,7 @@ public class Init extends BaseInit {
}
@Override
protected void beforeInit(SiteInit init) throws Exception {
protected boolean beforeInit(SiteInit init) throws Exception {
ErrorLogFile.errorOnlyConsole();
if (!skipPlugins) {
@@ -92,8 +92,10 @@ public class Init extends BaseInit {
} else {
ui.message("No plugins found.\n");
}
return true;
}
}
return false;
}
@Override