diff options
author | Valery Piashchynski <[email protected]> | 2023-02-27 11:21:19 +0100 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2023-02-27 11:21:19 +0100 |
commit | 952a1b6c281a4f09cced9488bf3a2056c9f42028 (patch) | |
tree | 4a03b3ca1378a81239c39529edd63f174e61abee /internal/cli | |
parent | 2acdcbce00382816a0b4758b0dc88ea4a0f3a9e6 (diff) |
fix: index_out_of_range panic
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'internal/cli')
-rw-r--r-- | internal/cli/jobs/command.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/cli/jobs/command.go b/internal/cli/jobs/command.go index 589b7710..adc930f8 100644 --- a/internal/cli/jobs/command.go +++ b/internal/cli/jobs/command.go @@ -35,6 +35,10 @@ func NewCommand(cfgFile *string, override *[]string, silent *bool) *cobra.Comman return errors.E(op, errors.Str("no configuration file provided")) } + if len(args) == 0 { + return errors.Str("incorrect command usage, should be: rr jobs pause/resume/destroy/list") + } + // for the commands other than list, args[1] should contain list of pipelines to pause/resume/destroy if !listPipes && len(args[0]) == 0 { return errors.Str("pause/resume/destroy commands should have list of the pipelines as second arg") |