This commit is contained in:
Michael Samoylov 2020-08-11 15:39:51 +03:00 committed by GitHub
parent a0b86e58f8
commit 5cdf8e26ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -334,10 +334,10 @@ var tryCmd = &cobra.Command{
Use: "try",
Short: "Try and possibly fail at something",
RunE: func(cmd *cobra.Command, args []string) error {
err := someFunc()
if err := nil {
if err := someFunc(); err != nil {
return err
}
return nil
},
}
```