Skip to content

Commit 36fada6

Browse files
committed
Fix tool-cache directory on self-hosted runners
1 parent 27853eb commit 36fada6

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/scripts/darwin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ get_scan_dir() {
212212

213213
# Function to handle self-hosted runner setup.
214214
self_hosted_helper() {
215-
:
215+
sudo mkdir -p /opt/hostedtoolcache >/dev/null 2>&1 || true
216216
}
217217

218218
# Function to Setup PHP.

src/scripts/linux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ self_hosted_helper() {
2020
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
2121
trap "sudo rm -f /usr/bin/apt-fast 2>/dev/null" exit
2222
fi
23+
sudo mkdir -p /opt/hostedtoolcache >/dev/null 2>&1 || true
2324
install_packages apt-transport-https ca-certificates curl file make jq unzip autoconf automake gcc g++ gnupg
2425
}
2526

src/scripts/unix.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ self_hosted_setup() {
221221
exit 1
222222
else
223223
self_hosted_helper >/dev/null 2>&1
224-
add_env RUNNER_TOOL_CACHE /tmp
224+
add_env RUNNER_TOOL_CACHE /opt/hostedtoolcache
225225
fi
226226
fi
227227
}

0 commit comments

Comments
 (0)