From 2b4c0664ee8f3397b703e5119b404fad5658732b Mon Sep 17 00:00:00 2001 From: yetone Date: Sat, 24 Oct 2026 02:47:28 +0800 Subject: [PATCH] update: the fake open in the relaunch test keeps -n on Linux TestRelaunchOpenTriedAgain was red on ubuntu CI at 27a8255fd (run 40004148936): opened " --args tray", want "-n --args tray". The relaunch passed -n; the test's fake `open` lost it. It wrote its arguments with echo "$@", and ubuntu's /bin/sh is dash, whose echo takes a leading -n as its own flag. macOS's sh is bash, so it passed there. The fake now writes them with printf '%s\n' "$*". Run: in Docker golang:1.26.8 (GOTOOLCHAIN=local, -tags nogui) the old test fails the same way as CI and the new one passes go test ./internal/update -run TestRelaunch; on macOS go test ./internal/update -run TestRelaunch passes. Test-only change, no release. --- internal/update/relaunch_retry_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/update/relaunch_retry_test.go b/internal/update/relaunch_retry_test.go index 07e7784c1..838a98894 100644 --- a/internal/update/relaunch_retry_test.go +++ b/internal/update/relaunch_retry_test.go @@ -29,7 +29,7 @@ if [ $n -le ` + strconv.Itoa(fails) + ` ]; then echo "_LSOpenURLsWithCompletionHandler() failed for the application $app with error -600." >&2 exit 1 fi -echo "$@" > "$d/opened" +printf '%s\n' "$*" > "$d/opened" ` if err := os.WriteFile(filepath.Join(dir, "open"), []byte(script), 0o755); err != nil { t.Fatal(err)