Skip to content

Commit 0538b91

Browse files
vokamutstayallive
andauthored
Add options to the artisan sentry:publish command to better support --no-interaction mode (#509)
Co-authored-by: Alex Bouma <[email protected]>
1 parent 9f1e669 commit 0538b91

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Update phpdoc on facade for better IDE autocompletion (#504)
66
- Exceptions captured using log channels (Monolog) will now have the correct severity set (#505)
77
- Tags passed through log channels (Monolog) context are cast as string to prevent type errors (#507)
8+
- Add options to the `artisan sentry:publish` command to better support `--no-interaction` mode (#509)
89

910
## 2.7.0
1011

src/Sentry/Laravel/PublishConfigCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PublishConfigCommand extends Command
1919
*
2020
* @var string
2121
*/
22-
protected $signature = 'sentry:publish {--dsn=}';
22+
protected $signature = 'sentry:publish {--dsn=} {--without-performance-monitoring} {--without-test}';
2323

2424
/**
2525
* The console command description.
@@ -65,7 +65,7 @@ public function handle()
6565
$args = array_merge($args, ['--dsn' => $dsn]);
6666
}
6767

68-
if ($this->confirm('Enable Performance Monitoring?', true)) {
68+
if ($this->confirm('Enable Performance Monitoring?', !$this->option('without-performance-monitoring'))) {
6969
$this->setEnvironmentValue(['SENTRY_TRACES_SAMPLE_RATE' => 1.0]);
7070

7171
$this->info('[Sentry] Added `SENTRY_TRACES_SAMPLE_RATE=1` to your .env file.');
@@ -76,7 +76,7 @@ public function handle()
7676
$testCommandPrompt = 'Want to send a test Event?';
7777
}
7878

79-
if ($this->confirm($testCommandPrompt, true)) {
79+
if ($this->confirm($testCommandPrompt, !$this->option('without-test'))) {
8080
$this->call('sentry:test', $args);
8181
}
8282
}

0 commit comments

Comments
 (0)