Skip to content

Commit 3395d11

Browse files
committed
ci cleanup prefer native timeout and simplify pre-sleep bounds
1 parent 7e81370 commit 3395d11

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

scripts/ci/cleanup-dmg.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ fi
3737
case "${detach_pre_sleep_seconds}" in
3838
''|*[!0-9]*) detach_pre_sleep_seconds=8 ;;
3939
esac
40-
if [ "${detach_pre_sleep_seconds}" -lt 0 ] 2>/dev/null; then
41-
detach_pre_sleep_seconds=0
42-
elif [ "${detach_pre_sleep_seconds}" -gt 120 ] 2>/dev/null; then
40+
if [ "${detach_pre_sleep_seconds}" -gt 120 ] 2>/dev/null; then
4341
detach_pre_sleep_seconds=120
4442
fi
4543

@@ -141,10 +139,6 @@ select_canonicalize_tool() {
141139
select_canonicalize_tool
142140

143141
select_lsof_timeout_tool() {
144-
if command -v python3 >/dev/null 2>&1; then
145-
lsof_timeout_tool="python3"
146-
return
147-
fi
148142
if command -v gtimeout >/dev/null 2>&1; then
149143
lsof_timeout_tool="gtimeout"
150144
return
@@ -153,6 +147,10 @@ select_lsof_timeout_tool() {
153147
lsof_timeout_tool="timeout"
154148
return
155149
fi
150+
if command -v python3 >/dev/null 2>&1; then
151+
lsof_timeout_tool="python3"
152+
return
153+
fi
156154
lsof_timeout_tool=""
157155
}
158156

0 commit comments

Comments
 (0)