From 96d7cf331d72071042e29fd89c41ae8eff3c555f Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Tue, 2 Sep 2025 14:42:11 +0530 Subject: [PATCH] Fix warning on chmod on failure in get --- src/scripts/unix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/unix.sh b/src/scripts/unix.sh index c013ee69..8641035e 100644 --- a/src/scripts/unix.sh +++ b/src/scripts/unix.sh @@ -145,7 +145,7 @@ get() { status_code=$(sudo curl -w "%{http_code}" -o "$file_path" "${curl_opts[@]}" "$link") [ "$status_code" = "200" ] && break done - [ "$execute" = "-e" ] && sudo chmod a+x "$file_path" + [[ "$execute" = "-e" && -e "$file_path" ]] && sudo chmod a+x "$file_path" [ "$mode" = "-v" ] && echo "$status_code" [ "$runner" = "self-hosted" ] && release_lock "$lock_path" fi