From cbf58e0652d0a4489ae9c7bf678c851ef9ead09d Mon Sep 17 00:00:00 2001 From: "Giau. Tran Minh" Date: Sat, 5 Oct 2024 13:19:54 +0700 Subject: [PATCH] cmd/atlas: fixed default `lint.review` check --- cmd/atlas/internal/cmdapi/schema.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/atlas/internal/cmdapi/schema.go b/cmd/atlas/internal/cmdapi/schema.go index 4c05f427115..406da03c532 100644 --- a/cmd/atlas/internal/cmdapi/schema.go +++ b/cmd/atlas/internal/cmdapi/schema.go @@ -66,7 +66,7 @@ func (f *schemaApplyFlags) check(env *Env) error { return errors.New(`one of flag(s) "file" or "to" is required`) case f.txMode != txModeNone && f.txMode != txModeFile: return fmt.Errorf("unknown tx-mode %q", f.txMode) - case f.autoApprove && env.Lint.Review != "": + case f.autoApprove && env.LintReview() != ReviewAlways: return fmt.Errorf("auto-approve is not allowed when a lint policy is set to %q", env.Lint.Review) case f.edit && f.devURL == "": return errors.New("--edit requires a connection to the dev-database (provided by --dev-url)")