Fix enableExtensionUnix

This commit is contained in:
Shivam Mathur 2019-10-10 21:13:51 +05:30
parent dd5c977988
commit 05e2b0d1e9
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ exports.enableExtensionWindows = enableExtensionWindows;
function enableExtensionUnix(extension, os_version, log_prefix) {
return __awaiter(this, void 0, void 0, function* () {
return (`if [ ! "$(php -m | grep -i ${extension})" ] && [ -e "$ext_dir/${extension}.so" ]; then
echo "${yield utils.getExtensionPrefix(extension)}=${extension}" >> 'php -i | grep "Loaded Configuration" | sed -e "s|.*=>\s*||"'\n` +
echo "${yield utils.getExtensionPrefix(extension)}=${extension}" >> $ini_file\n` +
(yield utils.log('Enabled ' + extension, os_version, 'success', log_prefix)) +
`;\n elif [ "$(php -m | grep -i ${extension})" ]; then \n` +
(yield utils.log(extension + ' was already enabled', os_version, 'success', log_prefix)) +

View File

@ -75,7 +75,7 @@ export async function enableExtensionUnix(
`if [ ! "$(php -m | grep -i ${extension})" ] && [ -e "$ext_dir/${extension}.so" ]; then
echo "${await utils.getExtensionPrefix(
extension
)}=${extension}" >> 'php -i | grep "Loaded Configuration" | sed -e "s|.*=>\s*||"'\n` +
)}=${extension}" >> $ini_file\n` +
(await utils.log(
'Enabled ' + extension,
os_version,

View File

@ -5,7 +5,7 @@ fi
brew install php@"$1" composer >/dev/null 2>&1
brew link --force --overwrite php@"$1" >/dev/null 2>&1
ini_file=$(php --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g")
ext_dir=$(/usr/bin/php -i | grep "extension_dir => /usr" | sed -e "s|.*=> s*||")
ext_dir=$(php -i | grep "extension_dir => /usr" | sed -e "s|.*=> s*||")
sudo chmod 777 "$ini_file"
mkdir -p "$(pecl config-get ext_dir)"
composer global require hirak/prestissimo >/dev/null 2>&1