Skip to content

Commit

Permalink
Fix the deploy script
Browse files Browse the repository at this point in the history
Support the double quote string
  • Loading branch information
yankewei authored Aug 10, 2022
1 parent 9a6ac7b commit e79dab0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// Put the env data into .env file
$cmd = 'cd /var/www/site;cat /dev/null > .env;';
foreach ($env_array as $value) {
$value = addslashes($value); // The environment value may contain the double quote string
$cmd .= "echo $value >> .env;";
}

Expand All @@ -35,4 +36,4 @@

echo stream_get_contents($stream);

ssh2_disconnect($ssh_session);
ssh2_disconnect($ssh_session);

0 comments on commit e79dab0

Please sign in to comment.