Skip to content

Commit 7e1d3b2

Browse files
committed
Fixed regression with bin/plugin not listing the plugins available (1c725c0)
1 parent be558cc commit 7e1d3b2

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
* Force question to install demo content in theme update [#2493](https://github.com/getgrav/grav/issues/2493)
1111
* Fixed GPM errors from blueprints not being logged [#2505](https://github.com/getgrav/grav/issues/2505)
1212
* Don't error when IP is invalid [#2507](https://github.com/getgrav/grav/issues/2507)
13-
13+
* Fixed regression with `bin/plugin` not listing the plugins available (1c725c0)
14+
1415
# v1.6.9
1516
## 05/09/2019
1617

bin/plugin

+12-13
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,6 @@ $output = new ConsoleOutput();
7979
$output->getFormatter()->setStyle('red', new OutputFormatterStyle('red', null, array('bold')));
8080
$output->getFormatter()->setStyle('white', new OutputFormatterStyle('white', null, array('bold')));
8181

82-
if (is_null($plugin)) {
83-
$output->writeln('');
84-
$output->writeln("<red>$name plugin not found</red>");
85-
die;
86-
}
87-
88-
if (!$plugin->enabled) {
89-
$output->writeln('');
90-
$output->writeln("<red>$name not enabled</red>");
91-
die;
92-
}
93-
94-
9582
if (!$name) {
9683
$output->writeln('');
9784
$output->writeln('<red>Usage:</red>');
@@ -123,6 +110,18 @@ if (!$name) {
123110
}
124111

125112
exit;
113+
} else {
114+
if (is_null($plugin)) {
115+
$output->writeln('');
116+
$output->writeln("<red>$name plugin not found</red>");
117+
die;
118+
}
119+
120+
if (!$plugin->enabled) {
121+
$output->writeln('');
122+
$output->writeln("<red>$name not enabled</red>");
123+
die;
124+
}
126125
}
127126

128127
if ($plugin === null) {

0 commit comments

Comments
 (0)