Skip to content

Commit

Permalink
chore(cli): print new component version available message
Browse files Browse the repository at this point in the history
  • Loading branch information
PengyuanZhao committed Feb 6, 2024
1 parent b01682a commit 89a94a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cli/cmd/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,10 @@ func v1ComponentCommand(c *cliState, cmd *cobra.Command, component lwcomponent.C
"args", c.componentParser.componentArgs,
"cli_flags", c.componentParser.cliArgs)

// @jon-stewart: TODO: v1 dailyComponentUpdateAvailable
if component.ApiInfo != nil && component.InstalledVersion().LessThan(component.ApiInfo.Version) {
format := "%s v%s available: to update, run `lacework component update %s`\n\n"
cli.OutputHuman(fmt.Sprintf(format, cmd.Use, component.ApiInfo.Version, cmd.Use))
}

envs := []string{
fmt.Sprintf("LW_COMPONENT_NAME=%s", cmd.Use),
Expand Down

0 comments on commit 89a94a8

Please sign in to comment.