| 1865 | } |
| 1866 | |
| 1867 | func openInTablePlus(ctx *snap.Context, databasePath string) error { |
| 1868 | tablePlusApp := "/Applications/TablePlus.app" |
| 1869 | if _, err := os.Stat(tablePlusApp); err != nil { |
| 1870 | return fmt.Errorf("TablePlus.app not found at %s: %w", tablePlusApp, err) |
| 1871 | } |
| 1872 | |
| 1873 | cmd := exec.Command("open", "-a", tablePlusApp, databasePath) |
| 1874 | cmd.Stdout = ctx.Stdout() |
| 1875 | cmd.Stderr = ctx.Stderr() |
| 1876 | cmd.Stdin = ctx.Stdin() |
| 1877 | if err := cmd.Run(); err != nil { |
| 1878 | return fmt.Errorf("open TablePlus: %w", err) |
| 1879 | } |
| 1880 | |
| 1881 | return nil |
| 1882 | } |
| 1883 | |
| 1884 | func runListWindowsOfApp(ctx *snap.Context) error { |
| 1885 | if ctx.NArgs() != 0 { |