Skip to content

Commit 6ea4ffd

Browse files
authored
Values with spaces break application
Setting app name to: My Company Name will break the .env file. https://cln.sh/BNoLe8sCHBTu7vuzrouz+ ``` The environment file is invalid! Failed to parse dotenv file due to unexpected whitespace. Failed at [My Company Name]. ``` E.g. Ploi Is Awesome Company vs "Ploi Is Awesome Company"
1 parent b579306 commit 6ea4ffd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/EnvironmentSetCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function handle(): void
7878
public function setEnvVariable(string $envFileContent, string $key, string $value): array
7979
{
8080
$oldPair = $this->readKeyValuePair($envFileContent, $key);
81-
$newPair = $key . '=' . $value;
81+
$newPair = $key . '="' . $value . '"';
8282

8383
// For existed key.
8484
if ($oldPair !== null) {

0 commit comments

Comments
 (0)