fix: base64 encode .env

This commit is contained in:
Andras Bacsai 2024-04-17 15:34:31 +02:00
parent e2cd7fe17e
commit 67011ccd72

View File

@ -791,9 +791,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
"save" => "dotenv" "save" => "dotenv"
]); ]);
if (str($this->saved_outputs->get('dotenv'))->isNotEmpty()) { if (str($this->saved_outputs->get('dotenv'))->isNotEmpty()) {
$base64_dotenv = base64_encode($this->saved_outputs->get('dotenv')->value());
$this->execute_remote_command( $this->execute_remote_command(
[ [
"echo '{$this->saved_outputs->get('dotenv')->value()}' | tee $this->configuration_dir/.env > /dev/null" "echo '{$base64_dotenv}' | base64 -d | tee $this->configuration_dir/.env > /dev/null"
] ]
); );
} else { } else {