cli: fix errors being ignored on metadata apply

GitOrigin-RevId: 1f526c70f57082aa968ebc3d957c78613e9a399e
This commit is contained in:
Aravind K P 2021-04-16 17:20:54 +05:30 committed by hasura-bot
parent dd1192ca2c
commit 8bc7c2089c
2 changed files with 6 additions and 2 deletions

View File

@ -48,6 +48,7 @@ In the future, we will probably offer a way to explicitly choose which behaviour
- console: add custom_column_names to track_table request with replaced invalid characters (#992)
- console: add details button to the success notification to see inserted row
- console: add request preview for REST endpoints
- cli: fix errors being ignored during `metadata apply` in config v3 (fix #6784)
## v2.0.0-alpha.7

View File

@ -1,6 +1,8 @@
package commands
import (
"fmt"
"github.com/hasura/graphql-engine/cli"
"github.com/hasura/graphql-engine/cli/internal/metadataobject"
"github.com/hasura/graphql-engine/cli/internal/scripts"
@ -92,8 +94,9 @@ func executeMetadata(cmd string, ec *cli.ExecutionContext) error {
}
return nil
}
metadataHandler.V2ApplyMetadata()
if err := metadataHandler.V2ApplyMetadata(); err != nil {
return fmt.Errorf("\n%w", err)
}
}
return nil
}