Files
BrowserOS/packages/browseros/tools/patch/cmd/skip.go
Nikhil da1397900b refactor: rename internal BrowserOS CLIs (#832)
* refactor: rename internal BrowserOS CLIs

* fix: update dogfood binary gitignore
2026-04-27 16:18:45 -07:00

34 lines
945 B
Go

package cmd
import (
"fmt"
"github.com/browseros-ai/BrowserOS/packages/browseros/tools/patch/internal/engine"
"github.com/browseros-ai/BrowserOS/packages/browseros/tools/patch/internal/resolve"
"github.com/browseros-ai/BrowserOS/packages/browseros/tools/patch/internal/ui"
"github.com/spf13/cobra"
)
func init() {
command := &cobra.Command{
Use: "skip",
Annotations: map[string]string{"group": "Conflict:"},
Short: "Skip the current conflict and move to the next one",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
ws, err := resolve.FindActive(appState.Registry, appState.CWD)
if err != nil {
return err
}
result, err := engine.Skip(cmd.Context(), ws)
if err != nil {
return err
}
return renderResult(result, func() {
fmt.Println(ui.Warning(fmt.Sprintf("Skipped current conflict in %s", ws.Name)))
})
},
}
rootCmd.AddCommand(command)
}