Unified Agent + reusable Go agent core.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: stabilize mac backend candidate test

Lyric 1e6149c7 8d709c11

+15 -3
+15 -3
desktop/wails/backend_binary_test.go
··· 91 91 if len(candidates) < 3 { 92 92 t.Fatalf("expected multiple candidates, got %#v", candidates) 93 93 } 94 - if got, want := candidates[0], filepath.Join(appDir, "usr", "bin", desktopBackendBinaryBaseName()); got != want { 94 + if got, want := candidates[0], filepath.Join(appDir, "usr", "bin", desktopBackendBinaryBaseName()); !sameCleanPath(got, want) { 95 95 t.Fatalf("first candidate = %q, want %q", got, want) 96 96 } 97 97 wdCandidate := filepath.Join(wd, "bin", desktopBackendBinaryBaseName()) ··· 99 99 appIdx := -1 100 100 wdIdx := -1 101 101 for i, c := range candidates { 102 - if c == appDirCandidate { 102 + if sameCleanPath(c, appDirCandidate) { 103 103 appIdx = i 104 104 } 105 - if c == wdCandidate { 105 + if sameCleanPath(c, wdCandidate) { 106 106 wdIdx = i 107 107 } 108 108 } ··· 123 123 t.Fatalf("expected file to be executable") 124 124 } 125 125 } 126 + 127 + func sameCleanPath(a, b string) bool { 128 + a = filepath.Clean(a) 129 + b = filepath.Clean(b) 130 + if resolved, err := filepath.EvalSymlinks(a); err == nil { 131 + a = filepath.Clean(resolved) 132 + } 133 + if resolved, err := filepath.EvalSymlinks(b); err == nil { 134 + b = filepath.Clean(resolved) 135 + } 136 + return a == b 137 + }