Skip to content

Commit

Permalink
Renamed startup flag to autostart based on PR feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-as committed Aug 31, 2023
1 parent c807070 commit 6a2794a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/state-svc/autostart/autostart.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
var Options = autostart.Options{
Name: constants.SvcAppName,
LaunchFileName: constants.SvcLaunchFileName,
Args: []string{"start", "--startup"},
Args: []string{"start", "--autostart"},
}

func RegisterConfigListener(cfg *config.Instance) error {
Expand Down
8 changes: 4 additions & 4 deletions cmd/state-svc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func run(cfg *config.Instance) error {
)

var foregroundArgText string
var startup bool
var autostart bool

cmd.AddChildren(
captain.NewCommand(
Expand All @@ -131,14 +131,14 @@ func run(cfg *config.Instance) error {
"Start the ActiveState Service (Background)",
p,
[]*captain.Flag{
{Name: "startup", Value: &startup}, // differentiate between autostart and cli invocation
{Name: "autostart", Value: &autostart, Hidden: true}, // differentiate between autostart and cli invocation
},
nil,
func(ccmd *captain.Command, args []string) error {
logging.Debug("Running CmdStart")
argText := "svc-start:cli"
if startup {
argText = "svc-start:startup"
if autostart {
argText += "-autostart"
}
return runStart(out, argText)
},
Expand Down

0 comments on commit 6a2794a

Please sign in to comment.