Skip to content

Commit 6b552ae

Browse files
authored
Merge pull request #8 from OpsLevel/kr/integration-flag-protect
protect and alert on missing integration flag
2 parents 845bdd4 + aa38887 commit 6b552ae

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Fixed
2+
body: If no --integration flag is given present the user with an error
3+
time: 2024-12-16T12:56:34.444366-06:00

cmd/root.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ var rootCmd = &cobra.Command{
3737
Run: func(cmd *cobra.Command, args []string) {
3838
cluster := viper.GetString("cluster")
3939
integration := viper.GetString("integration")
40+
if integration == "" {
41+
cobra.CheckErr(fmt.Errorf("--integration was not given, please specify the ID or Alias of the kubernetes integration to send the events too"))
42+
}
4043
configuration, err := LoadConfig()
4144
cobra.CheckErr(err)
4245

0 commit comments

Comments
 (0)