You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Command/Import/ImportUploadsCommand.php
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,7 @@ protected function configure()
98
98
->setDescription('Import files to the environment uploads directory')
99
99
->addArgument('path', InputArgument::REQUIRED, 'The path to the files to import')
100
100
->addOption('environment', null, InputOption::VALUE_REQUIRED, 'The environment to upload files to', 'staging')
101
+
->addOption('force', null, InputOption::VALUE_NONE, 'Force the import to run')
101
102
->addOption('size', null, InputOption::VALUE_REQUIRED, 'The number of files to process at a time', '20');
102
103
}
103
104
@@ -114,13 +115,13 @@ protected function perform(InputInterface $input, OutputInterface $output)
114
115
thrownewInvalidArgumentException('Cannot have a "size" smaller than 1');
115
116
}
116
117
117
-
if (!$output->confirm('Importing files will overwrite any existing file in the environment uploads directory. Do you want to proceed?')) {
118
+
if (!$this->getBooleanOption($input, 'force') && !$output->confirm('Importing files will overwrite any existing file in the environment "uploads" directory. Do you want to proceed?')) {
0 commit comments