summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.golangci.yml1
-rw-r--r--internal/cli/jobs/command.go4
2 files changed, 4 insertions, 1 deletions
diff --git a/.golangci.yml b/.golangci.yml
index 0e6f5b96..0533b9eb 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -54,7 +54,6 @@ linters: # All available linters list: <https://golangci-lint.run/usage/linters/
- errorlint # find code that will cause problems with the error wrapping scheme introduced in Go 1.13
- exhaustive # check exhaustiveness of enum switch statements
- exportloopref # checks for pointers to enclosing loop variables
- - funlen # Tool for detection of long functions
- gochecknoglobals # Checks that no globals are present in Go code
- gocognit # Computes and checks the cognitive complexity of functions
- goconst # Finds repeated strings that could be replaced by a constant
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")