Skip to content

Commit 48a3d84

Browse files
authored
Add step to install sudo in workflow
Ensure sudo is installed before fixing pip cache permissions.
1 parent 931095e commit 48a3d84

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/testing1087.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v6
16-
- name: Clear pre-mounted tool cache
16+
- name: Ensure Sudo is Installed
1717
run: |
18-
echo "Before:"
19-
ls /__t/Python/ || echo "no Python dir"
20-
rm -rf /__t/Python
21-
echo "After:"
22-
ls /__t/Python/ || echo "cleared"
18+
if ! command -v sudo &> /dev/null; then
19+
echo "sudo could not be found. Installing..."
20+
apt-get update && apt-get install -y sudo
21+
fi
22+
- name: Fix pip cache permissions
23+
run: sudo chown -R $(whoami) /github/home
24+
2325

2426
- name: Setup Python 3.8
2527
uses: actions/setup-python@v5

0 commit comments

Comments
 (0)