Fix scripts to allow pathname with space (#13027)

This commit is contained in:
Sean
2021-07-14 22:00:21 -05:00
committed by GitHub
parent fd9328af55
commit 1a97559816
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ if (php_sapi_name() == 'cli' && isset($_SERVER['TERM'])) {
}
if (is_file($install_dir . '/composer.phar')) {
$exec = PHP_BINDIR . '/php ' . $install_dir . '/composer.phar';
$exec = PHP_BINDIR . "/php '" . $install_dir . "/composer.phar'";
// If older than 1 week, try update
if (time() - filemtime($install_dir . '/composer.phar') > 60 * 60 * 24 * 7) {
@@ -80,7 +80,7 @@ if (is_file($install_dir . '/composer.phar')) {
} elseif (@hash_file('SHA384', $dest) === $good_sha) {
// Installer verified
shell_exec(PHP_BINDIR . "/php $dest");
$exec = PHP_BINDIR . "/php $install_dir/composer.phar";
$exec = PHP_BINDIR . "/php '$install_dir/composer.phar'";
} else {
echo "Error: Corrupted download, signature doesn't match for $installer_url\n";
}