--spec flags for env and trigger creates (#607)
This commit is contained in:
@@ -77,6 +77,14 @@ func wCreate(c *cli.Context) error {
|
||||
},
|
||||
}
|
||||
|
||||
// if we're writing a spec, don't call the API
|
||||
if c.Bool("spec") {
|
||||
specFile := fmt.Sprintf("kubewatch-%v.yaml", watchName)
|
||||
err := specSave(*w, specFile)
|
||||
checkErr(err, "create kubernetes watch spec")
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := client.WatchCreate(w)
|
||||
checkErr(err, "create watch")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user