ci: guard sources.list sed against missing file
Newer Ubuntu/Debian runners use /etc/apt/sources.list.d/ and don't have /etc/apt/sources.list, causing the sed to fail with exit code 2.
This commit is contained in:
parent
0d961e887f
commit
45413095a9
3 changed files with 3 additions and 3 deletions
|
|
@ -90,7 +90,7 @@ jobs:
|
|||
- name: Install system dependencies
|
||||
run: |
|
||||
. /etc/os-release
|
||||
if [ "$ID" = "debian" ]; then
|
||||
if [ "$ID" = "debian" ] && [ -f /etc/apt/sources.list ]; then
|
||||
sed -i 's/ main$/ main contrib non-free non-free-firmware/' /etc/apt/sources.list
|
||||
fi
|
||||
apt-get update
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ jobs:
|
|||
- name: Install system dependencies
|
||||
run: |
|
||||
. /etc/os-release
|
||||
if [ "$ID" = "debian" ]; then
|
||||
if [ "$ID" = "debian" ] && [ -f /etc/apt/sources.list ]; then
|
||||
sed -i 's/ main$/ main contrib non-free non-free-firmware/' /etc/apt/sources.list
|
||||
fi
|
||||
apt-get update
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ jobs:
|
|||
- name: Install system dependencies
|
||||
run: |
|
||||
. /etc/os-release
|
||||
if [ "$ID" = "debian" ]; then
|
||||
if [ "$ID" = "debian" ] && [ -f /etc/apt/sources.list ]; then
|
||||
sed -i 's/ main$/ main contrib non-free non-free-firmware/' /etc/apt/sources.list
|
||||
fi
|
||||
apt-get update
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue