From 38ee189aa88a196325469632f20e7a55a3842aad Mon Sep 17 00:00:00 2001 From: Mahan Zendedel DH Date: Wed, 19 Jun 2024 16:37:26 +0400 Subject: [PATCH] fix: update agent (#233) --- cmd/root.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 801689b..2262d3e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -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") @@ -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")