mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 05:23:03 +07:00
Merge pull request #58 from shivammathur/develop
Fix enableExtensionUnix
This commit is contained in:
commit
3087ceb811
@ -63,7 +63,7 @@ exports.enableExtensionWindows = enableExtensionWindows;
|
|||||||
function enableExtensionUnix(extension, os_version, log_prefix) {
|
function enableExtensionUnix(extension, os_version, log_prefix) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return (`if [ ! "$(php -m | grep -i ${extension})" ] && [ -e "$ext_dir/${extension}.so" ]; then
|
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)) +
|
(yield utils.log('Enabled ' + extension, os_version, 'success', log_prefix)) +
|
||||||
`;\n elif [ "$(php -m | grep -i ${extension})" ]; then \n` +
|
`;\n elif [ "$(php -m | grep -i ${extension})" ]; then \n` +
|
||||||
(yield utils.log(extension + ' was already enabled', os_version, 'success', log_prefix)) +
|
(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
|
`if [ ! "$(php -m | grep -i ${extension})" ] && [ -e "$ext_dir/${extension}.so" ]; then
|
||||||
echo "${await utils.getExtensionPrefix(
|
echo "${await utils.getExtensionPrefix(
|
||||||
extension
|
extension
|
||||||
)}=${extension}" >> 'php -i | grep "Loaded Configuration" | sed -e "s|.*=>\s*||"'\n` +
|
)}=${extension}" >> $ini_file\n` +
|
||||||
(await utils.log(
|
(await utils.log(
|
||||||
'Enabled ' + extension,
|
'Enabled ' + extension,
|
||||||
os_version,
|
os_version,
|
||||||
|
@ -5,7 +5,7 @@ fi
|
|||||||
brew install php@"$1" composer >/dev/null 2>&1
|
brew install php@"$1" composer >/dev/null 2>&1
|
||||||
brew link --force --overwrite php@"$1" >/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")
|
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"
|
sudo chmod 777 "$ini_file"
|
||||||
mkdir -p "$(pecl config-get ext_dir)"
|
mkdir -p "$(pecl config-get ext_dir)"
|
||||||
composer global require hirak/prestissimo >/dev/null 2>&1
|
composer global require hirak/prestissimo >/dev/null 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user