(ctx *snap.Context, path string)
| 1462 | } |
| 1463 | |
| 1464 | func openInCursor(ctx *snap.Context, path string) error { |
| 1465 | cursorApp := "/Applications/Cursor.app" |
| 1466 | if _, err := os.Stat(cursorApp); err != nil { |
| 1467 | return fmt.Errorf("Cursor.app not found at %s: %w", cursorApp, err) |
| 1468 | } |
| 1469 | |
| 1470 | cmd := exec.Command("open", "-a", cursorApp, path) |
| 1471 | cmd.Stdout = ctx.Stdout() |
| 1472 | cmd.Stderr = ctx.Stderr() |
| 1473 | cmd.Stdin = ctx.Stdin() |
| 1474 | if err := cmd.Run(); err != nil { |
| 1475 | return fmt.Errorf("open Cursor: %w", err) |
| 1476 | } |
| 1477 | |
| 1478 | return nil |
| 1479 | } |
| 1480 | |
| 1481 | func openInZed(ctx *snap.Context, path string) error { |
| 1482 | zedApp := "/Applications/Zed.app" |
no outgoing calls
no test coverage detected