Skip to content

Commit ac26154

Browse files
authored
add-apt-repository pre-requisites (#4054)
* Install `provision:update` pre-requisites * `add-apt-repository` is broken with non-UTF-8 locales See: oerdnj/deb.sury.org#56 (comment) * Moves env var to env
1 parent 94cc069 commit ac26154

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

recipe/provision.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,17 @@
123123
task('provision:update', function () {
124124
set('remote_user', get('provision_user'));
125125

126+
// Update before installing anything
127+
run('apt-get update', env: ['DEBIAN_FRONTEND' => 'noninteractive']);
128+
129+
// Pre-requisites
130+
run('apt install -y curl gpg software-properties-common', env: ['DEBIAN_FRONTEND' => 'noninteractive']);
131+
126132
// PHP
127-
run('apt-add-repository ppa:ondrej/php -y', env: ['DEBIAN_FRONTEND' => 'noninteractive']);
133+
run('apt-add-repository ppa:ondrej/php -y', env: [
134+
'DEBIAN_FRONTEND' => 'noninteractive',
135+
'LC_ALL' => 'C.UTF-8',
136+
]);
128137

129138
// Caddy
130139
run("curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor --yes -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg");

0 commit comments

Comments
 (0)