Skip to content

Commit 956f1f7

Browse files
committed
fix: improve fnm retry delay and lock file cleanup
1 parent b0ab3ed commit 956f1f7

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1873,7 +1873,7 @@ configure_fnm() {
18731873
((fnm_install_retries--))
18741874
if [ $fnm_install_retries -gt 0 ]; then
18751875
print_warning "fnm download failed, retrying... ($fnm_install_retries attempts left)"
1876-
sleep 2
1876+
sleep 5
18771877
fi
18781878
done
18791879

update.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,9 +1162,10 @@ do_draphyos_update() {
11621162
rm -f "$lock_file"
11631163
fi
11641164
echo $$ > "$lock_file"
1165-
# Clean up lock on function return (RETURN trap is function-scoped, doesn't conflict)
1165+
# Clean up lock on function return and script exit (belt-and-suspenders)
11661166
_cleanup_draphyos_lock() { rm -f "$lock_file" 2>/dev/null || true; }
11671167
trap '_cleanup_draphyos_lock' RETURN
1168+
trap '_cleanup_draphyos_lock; cleanup_sudo' EXIT INT TERM
11681169

11691170
# Check for diff3 (required for three-way merge)
11701171
if ! command -v diff3 &>/dev/null; then

0 commit comments

Comments
 (0)