Skip to content

Commit 2cf56d9

Browse files
committed
Fix locking permissions in get function
1 parent 8d8f975 commit 2cf56d9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/scripts/unix.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ get() {
120120
sudo curl "${curl_opts[@]}" "${links[0]}"
121121
else
122122
if [ "$runner" = "self-hosted" ]; then
123-
lock_path="$file_path.lock"
123+
path_hash="$(printf '%s' "$file_path" | sha256sum | cut -d' ' -f1)"
124+
lock_path="/tmp/sp-lck-${path_hash}"
124125
acquire_lock "$lock_path"
125126
if [ "$execute" = "-e" ]; then
126127
until [ -z "$(fuser "$file_path" 2>/dev/null)" ]; do

0 commit comments

Comments
 (0)