• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / cli / 15583807449

11 Jun 2025 11:36AM UTC coverage: 55.106% (+0.02%) from 55.086%
15583807449

Pull #3680

github

web-flow
Merge ecceb62b8 into 06aaa3fcf
Pull Request #3680: feat: add restart command

42 of 65 new or added lines in 4 files covered. (64.62%)

10 existing lines in 3 files now uncovered.

6017 of 10919 relevant lines covered (55.11%)

6.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/cmd/restart.go
1
package cmd
2

3
import (
4
        "os"
5
        "os/signal"
6

7
        "github.com/spf13/afero"
8
        "github.com/spf13/cobra"
9
        "github.com/supabase/cli/internal/restart"
10
)
11

12
var (
13
        restartProjectId string
14
        restartAll       bool
15

16
        restartCmd = &cobra.Command{
17
                GroupID: groupLocalDev,
18
                Use:     "restart",
19
                Short:   "Restart all local Supabase containers",
NEW
20
                RunE: func(cmd *cobra.Command, args []string) error {
×
NEW
21
                        ctx, _ := signal.NotifyContext(cmd.Context(), os.Interrupt)
×
NEW
22
                        return restart.Run(ctx, restartProjectId, restartAll, afero.NewOsFs())
×
NEW
23
                },
×
24
        }
25
)
26

NEW
27
func init() {
×
NEW
28
        flags := restartCmd.Flags()
×
NEW
29
        flags.Bool("backup", true, "Backs up the current database before restarting.")
×
NEW
30
        flags.StringVar(&restartProjectId, "project-id", "", "Local project ID to restart.")
×
NEW
31
        cobra.CheckErr(flags.MarkHidden("backup"))
×
NEW
32
        flags.BoolVar(&restartAll, "all", false, "Restart all local Supabase instances from all projects across the machine.")
×
NEW
33
        restartCmd.MarkFlagsMutuallyExclusive("project-id", "all")
×
NEW
34
        rootCmd.AddCommand(restartCmd)
×
NEW
35
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc