Skip to content

Commit c8a0ac9

Browse files
committed
add option to disable notify self check
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 97f6388 commit c8a0ac9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

apps/files_external/lib/Command/Notify.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ protected function configure() {
9393
InputOption::VALUE_REQUIRED,
9494
'The directory in the storage to listen for updates in',
9595
'/'
96+
)->addOption(
97+
'no-self-check',
98+
'',
99+
InputOption::VALUE_NONE,
100+
'Disable self check on startup'
96101
);
97102
parent::configure();
98103
}
@@ -179,7 +184,11 @@ protected function execute(InputInterface $input, OutputInterface $output) {
179184

180185
$path = trim($input->getOption('path'), '/');
181186
$notifyHandler = $storage->notify($path);
182-
$this->selfTest($storage, $notifyHandler, $verbose, $output);
187+
188+
if (!$input->getOption('no-self-check')) {
189+
$this->selfTest($storage, $notifyHandler, $verbose, $output);
190+
}
191+
183192
$notifyHandler->listen(function (IChange $change) use ($mount, $verbose, $output) {
184193
if ($verbose) {
185194
$this->logUpdate($change, $output);

0 commit comments

Comments
 (0)