Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 7ba6bc6

Browse files
authored
Merge pull request #436 from syphernl/feature/no_interaction_v3
[v3.0] Allow imports to be done with "no-interaction"
2 parents ac39900 + 89cbbc2 commit 7ba6bc6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Commands/Import.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,14 @@ public function handle()
7777
$this->info("Found {$count} user(s).");
7878
}
7979

80-
if ($this->confirm('Would you like to display the user(s) to be imported / synchronized?')) {
80+
$interactive = ! $this->option('no-interaction');
81+
82+
if (!$interactive || $this->confirm('Would you like to display the user(s) to be imported / synchronized?')) {
8183
$this->display($users);
8284
}
8385

84-
if ($this->confirm('Would you like these users to be imported / synchronized?', $default = true)) {
86+
if (!$interactive || $this->confirm('Would you like these users to be imported / synchronized?',
87+
$default = true)) {
8588
$imported = $this->import($users);
8689

8790
$this->info("Successfully imported / synchronized {$imported} user(s).");

0 commit comments

Comments
 (0)