fix(php.sudo)

This commit is contained in:
Jacob Heider 2023-11-23 18:31:50 -05:00
parent 431fefd66b
commit f6b5174874
No known key found for this signature in database
GPG key ID: 51E3FD0EE62677B6

View file

@ -47,9 +47,14 @@ build:
script:
# this is annoying. install-pear-nozlib.phar relies on finding /usr/bin/cpp.
# and editing the archive messes with the offsets
- run: |
if command -v sudo >/dev/null; then
SUDO=sudo
fi
if: linux
- run: |
if [ ! -f /usr/bin/cpp ]; then
sudo ln -s "{{deps.gnu.org/gcc.prefix}}/bin/cpp" /usr/bin/cpp
$SUDO ln -s "{{deps.gnu.org/gcc.prefix}}/bin/cpp" /usr/bin/cpp
FAKE_CPP=1
fi
if: linux
@ -59,7 +64,7 @@ build:
# clean up our fake /usr/bin/cpp
- run: |
if [ -n "$FAKE_CPP" ]; then
sudo rm /usr/bin/cpp
$SUDO rm /usr/bin/cpp
fi
if: linux