agent: Cursor Private Inference's program in a .app is named as on a Mac on any system, so TestCursorLocal passes on Linux CI — the .app fallback (no Info.plist) took product.json's applicationName as Linux names it (cursor), while a .app is a Mac's bundle and its program is Cursor. The test failed on the ubuntu CI since v0.1.877 and passes now in a linux/arm64 container (it failed there on the old code). go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass.
This commit is contained in:
1 parent
60b910b758
commit
b7fef3877f
1 file changed
+10
-1
@@ -97,7 +97,7 @@ func findCursorLocal(roots []string) string {
|
||||
if exe := plistExecutable(filepath.Join(dir, "Contents", "Info.plist")); exe != "" {
|
||||
return filepath.Join(dir, "Contents", "MacOS", exe)
|
||||
}
|
||||
return filepath.Join(dir, "Contents", "MacOS", p.exe())
|
||||
return filepath.Join(dir, "Contents", "MacOS", p.macExe())
|
||||
}
|
||||
continue
|
||||
}
|
||||
@@ -130,6 +130,15 @@ func (p cursorProduct) exe() string {
|
||||
if runtime.GOOS == "linux" {
|
||||
return n
|
||||
}
|
||||
return p.macExe()
|
||||
}
|
||||
|
||||
// macExe is the program's name in a .app, which is a Mac's on any system.
|
||||
func (p cursorProduct) macExe() string {
|
||||
n := p.ApplicationName
|
||||
if n == "" {
|
||||
return "Cursor"
|
||||
}
|
||||
return strings.ToUpper(n[:1]) + n[1:]
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user