Skip to content

Commit

Permalink
fix: update agent (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahanmmi committed Jun 19, 2024
1 parent c154b56 commit 38ee189
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func init() {
optimizeCmd.PersistentFlags().String("preferences", "", "Path to preferences file (yaml)")
optimizeCmd.PersistentFlags().String("output", "interactive", "Show optimization results in selected output (possible values: interactive, table, csv, json. default value: interactive)")
optimizeCmd.PersistentFlags().Bool("plugin-debug-mode", false, "Enable plugin debug mode (manager wont start plugin)")
optimizeCmd.PersistentFlags().Bool("agent-mode", false, "Enable agent mode (to run on kaytu agent)")

terraformCmd.Flags().String("preferences", "", "Path to preferences file (yaml)")
terraformCmd.Flags().String("github-owner", "", "Github owner")
Expand Down Expand Up @@ -134,8 +135,10 @@ func Execute() {
return fmt.Errorf("output mode not recognized\npossible values: interactive, table, csv, json. default value: interactive (default \"interactive\")")
}

agentMode := utils.ReadBooleanFlag(c, "agent-mode")

if nonInteractiveFlag != "interactive" {
manager.SetNonInteractiveView(false)
manager.SetNonInteractiveView(agentMode)
}

pluginDebugMode := utils.ReadBooleanFlag(c, "plugin-debug-mode")
Expand Down

0 comments on commit 38ee189

Please sign in to comment.