update to warn if schemas aren't available

This commit is contained in:
Megan Bang
2022-08-26 14:17:37 -05:00
parent 4fab46749a
commit b8f2f81cd6
13 changed files with 91 additions and 48 deletions

View File

@@ -251,10 +251,7 @@ func (c *ImportCommand) Run(args []string) int {
// Get schemas, if possible, before writing state
schemas, diags := getSchemas(&c.Meta, newState, config)
if diags.HasErrors() {
// MBANG TODO - add warning that the schema could not be initialized
// and therefore the JSON state can not be created and may affect
// external applications relying on that data format
return 1
c.Ui.Warn(fmt.Sprintf(failedToLoadSchemasMessage, err))
}
// Persist the final state