From 9ea811447a225da563c1238fff68aa800f7baa5f Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: Sun, 3 Nov 2024 18:18:51 +0800 Subject: [PATCH] cdogs-sdl: extend sleep time This seems to be failing randomly[^1][^2], probably because we check for the existence of `.config/cdogs-sdl` before it's been created. [^1]: https://github.com/Homebrew/homebrew-core/actions/runs/11650519242/job/32439622244?pr=196506#step:3:50 [^2]: https://github.com/Homebrew/homebrew-core/actions/runs/11644329145/job/32431863664?pr=196421#step:3:260 --- Formula/c/cdogs-sdl.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Formula/c/cdogs-sdl.rb b/Formula/c/cdogs-sdl.rb index fb02af8131342..bdbf8bb882b47 100644 --- a/Formula/c/cdogs-sdl.rb +++ b/Formula/c/cdogs-sdl.rb @@ -49,7 +49,11 @@ def install pid = fork do exec bin/"cdogs-sdl" end - sleep 7 + + max_sleep_time = 90 + time_slept = 0 + time_slept += sleep(5) while !(testpath/".config/cdogs-sdl").exist? && time_slept < max_sleep_time + assert_predicate testpath/".config/cdogs-sdl", :exist?, "User config directory should exist" ensure