mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Fix enableExtensionUnix
This commit is contained in:
parent
dd5c977988
commit
05e2b0d1e9
@ -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)) +
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user