Skip to content

Commit

Permalink
Fix issue with --no-interaction flag on snapshot command
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisnharvey committed Nov 24, 2019
1 parent 4f4e651 commit a971bfe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/Command/SnapshotCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,16 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($purgeOlderThan = $input->getOption('purge-older-than')) {
$command = $this->getApplication()->find('purge');

$command->run(new ArrayInput([
$purgeInput = new ArrayInput([
'snapshot-subvolume-path' => $input->getArgument('snapshot-subvolume-path'),
'--older-than' => $purgeOlderThan
]), $output);
]);

$purgeInput->setInteractive(
! $input->getOption('no-interaction')
);

$command->run($purgeInput, $output);
}

$snapshot = Snapshot::createTimestampedSnapshot(
Expand Down

0 comments on commit a971bfe

Please sign in to comment.