Skip to content

Commit

Permalink
[CLI] Add --force option (implement #289).
Browse files Browse the repository at this point in the history
  • Loading branch information
lGuillaume124 committed Feb 5, 2019
1 parent fde2143 commit 7bc4cda
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/Console/Command/Task/SyncTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public function clean()
*/
private function isAgree($count = 0)
{
$choice = $this->in(
$choice = $this->param('force') ? 'Y' : $this->in(
sprintf('%d files to process. Continue?', $count),
array('Y', 'N'),
'Y'
Expand Down Expand Up @@ -435,6 +435,11 @@ public function getOptionParser()
'short' => 'i',
'help' => 'Only perform import process.',
'boolean' => true,
))->addOption('force', array(
'short' => 'f',
'help' => 'Disable interactions and answer "yes" to every command.',
'boolean' => true,
'default' => false,
))->addOption('update', array(
'short' => 'u',
'help' => 'Only perform update process.',
Expand Down

0 comments on commit 7bc4cda

Please sign in to comment.