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
1 changed files with 2 additions and 2 deletions

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
},
}
```