diff --git a/__tests__/extensions.test.ts b/__tests__/extensions.test.ts index c5bf0110..6c77f56b 100644 --- a/__tests__/extensions.test.ts +++ b/__tests__/extensions.test.ts @@ -40,10 +40,10 @@ describe('Extension tests', () => { 'linux' ); expect(linux).toContain( - 'sudo DEBIAN_FRONTEND=noninteractive apt install -y php7.2-xdebug' + 'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php7.2-xdebug' ); expect(linux).toContain( - 'sudo DEBIAN_FRONTEND=noninteractive apt install -y php7.2-pcov' + 'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php7.2-pcov' ); linux = await extensions.addExtension('xdebug, pcov', '7.4', 'linux'); diff --git a/lib/extensions.js b/lib/extensions.js index 0ba1cdeb..d56f0a47 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -172,7 +172,7 @@ function addExtensionLinux(extension_csv, version) { break; default: install_command = - 'sudo DEBIAN_FRONTEND=noninteractive apt install -y php' + + 'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php' + version + '-' + extension + diff --git a/src/extensions.ts b/src/extensions.ts index 9c3d2a4a..032c3fbf 100644 --- a/src/extensions.ts +++ b/src/extensions.ts @@ -165,7 +165,7 @@ export async function addExtensionLinux( break; default: install_command = - 'sudo DEBIAN_FRONTEND=noninteractive apt install -y php' + + 'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php' + version + '-' + extension + diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index f825e7c4..7bd046fa 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -23,11 +23,10 @@ step_log "Setup PHP and Composer" if [ "$existing_version" != "$1" ]; then if [ ! -e "/usr/bin/php$1" ]; then sudo DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:ondrej/php -y >/dev/null 2>&1 - sudo DEBIAN_FRONTEND=noninteractive apt update -y >/dev/null 2>&1 if [ "$1" != "7.4" ]; then - sudo DEBIAN_FRONTEND=noninteractive apt install -y php"$1" curl php"$1"-curl >/dev/null 2>&1 + sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$1" curl php"$1"-curl >/dev/null 2>&1 else - sudo DEBIAN_FRONTEND=noninteractive apt install -y php"$1" php"$1"-dev curl php"$1"-curl >/dev/null 2>&1 + sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$1" php"$1"-dev curl php"$1"-curl >/dev/null 2>&1 fi status="Installed PHP$version" fi