diff --git a/cmd/heimdalld/service/service.go b/cmd/heimdalld/service/service.go index 3fe70f48d..385b517ee 100644 --- a/cmd/heimdalld/service/service.go +++ b/cmd/heimdalld/service/service.go @@ -253,6 +253,13 @@ For profiling and benchmarking purposes, CPU profiling can be enabled via the '- which accepts a path for the resulting pprof file. `, RunE: func(cmd *cobra.Command, args []string) error { + for _, arg := range args { + if !strings.HasPrefix(arg, "--") { + return fmt.Errorf( + "\tinvalid argument: %s \n\tall flags must start with --", + arg) + } + } LogsWriterFile := viper.GetString(helper.LogsWriterFileFlag) if LogsWriterFile != "" { logWriter := helper.GetLogsWriter(LogsWriterFile)