mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-18 19:16:22 +00:00
* fix: make patch list registry-only * feat: add patch command progress logs * fix: address review feedback for PR #921
37 lines
1023 B
Go
37 lines
1023 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(), engine.SkipOptions{
|
|
Workspace: ws,
|
|
Progress: commandProgress(cmd),
|
|
})
|
|
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)
|
|
}
|