Skip to content

Commit

Permalink
feat: add --no-progress flag for maru-runner (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Racer159 authored Mar 7, 2024
1 parent 4950f07 commit b32b783
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
1 change: 1 addition & 0 deletions src/cmd/viper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/config/lang/lang.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b32b783

Please sign in to comment.