Skip to content

Commit

Permalink
server/run: Add CommandWithSetParams
Browse files Browse the repository at this point in the history
In the future, it will return a string where all params have been
replaced with the provided value
  • Loading branch information
joshi4 committed Jun 14, 2024
1 parent 573e85e commit c8de3f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/internal/next.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var nextCmd = &cobra.Command{
os.Exit(1)
}

if state.Command != executedCommand {
if state.CommandWithSetParams() != executedCommand {
fmt.Printf("%d", state.Index)
return
}
Expand Down
4 changes: 4 additions & 0 deletions server/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ type State struct {
Params map[string]string `json:"params"`
}

func (s *State) CommandWithSetParams() string {
return s.Command
}

const DefaultRunSocketPath = "/tmp/savvy-run.sock"

var ErrStartingRunSession = errors.New("failed to start run session")
Expand Down

0 comments on commit c8de3f7

Please sign in to comment.