We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42d03af commit 93247f9Copy full SHA for 93247f9
src/Sentry/Laravel/Console/PublishCommand.php
@@ -105,6 +105,10 @@ private function setEnvValues(array $values): bool
105
106
$this->info("Updated {$envKey} with new value in your `.env` file.");
107
} else {
108
+ // Ensure there is a newline before writing env variables
109
+ if (substr($envFileContents, -1) !== "\n") {
110
+ $envFileContents .= "\n";
111
+ }
112
$envFileContents .= "{$envKey}={$envValue}\n";
113
114
$this->info("Added {$envKey} to your `.env` file.");
0 commit comments