diff --git a/src/cmd/root.go b/src/cmd/root.go index db677e5..806d204 100644 --- a/src/cmd/root.go +++ b/src/cmd/root.go @@ -76,6 +76,7 @@ func init() { rootCmd.PersistentFlags().StringVarP(&config.LogLevel, "log-level", "l", v.GetString(V_LOG_LEVEL), lang.RootCmdFlagLogLevel) rootCmd.PersistentFlags().StringVarP(&config.CLIArch, "architecture", "a", v.GetString(V_ARCHITECTURE), lang.RootCmdFlagArch) + rootCmd.PersistentFlags().BoolVar(&message.NoProgress, "no-progress", v.GetBool(V_NO_PROGRESS), lang.RootCmdFlagNoProgress) rootCmd.PersistentFlags().BoolVar(&config.SkipLogFile, "no-log-file", v.GetBool(V_NO_LOG_FILE), lang.RootCmdFlagSkipLogFile) rootCmd.PersistentFlags().StringVar(&config.TempDirectory, "tmpdir", v.GetString(V_TMP_DIR), lang.RootCmdFlagTempDir) } diff --git a/src/cmd/viper.go b/src/cmd/viper.go index 34e89ad..c781fb8 100644 --- a/src/cmd/viper.go +++ b/src/cmd/viper.go @@ -20,6 +20,7 @@ const ( // Root config keys V_LOG_LEVEL = "options.log_level" V_ARCHITECTURE = "options.architecture" + V_NO_PROGRESS = "options.no_progress" V_NO_LOG_FILE = "options.no_log_file" V_TMP_DIR = "options.tmp_dir" V_ENV_PREFIX = "options.env_prefix" diff --git a/src/config/lang/lang.go b/src/config/lang/lang.go index af26b51..d660215 100644 --- a/src/config/lang/lang.go +++ b/src/config/lang/lang.go @@ -9,6 +9,7 @@ const ( RootCmdShort = "CLI for the maru runner" RootCmdFlagSkipLogFile = "Disable log file creation" RootCmdFlagLogLevel = "Log level for the runner. Valid options are: warn, info, debug, trace" + RootCmdFlagNoProgress = "Disable fancy UI progress bars, spinners, logos, etc" RootCmdErrInvalidLogLevel = "Invalid log level. Valid options are: warn, info, debug, trace." RootCmdFlagArch = "Architecture for the runner" RootCmdFlagTempDir = "Specify the temporary directory to use for intermediate files"