From 5c9836992e78f117923c9b574c5af327c8465800 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Mon, 8 May 2023 07:20:29 -0600 Subject: [PATCH] Fix inverted `--print/--no-print` flag (#7524) (cherry picked from commit 19d6dab973c0d77a67b68806c56b82a21e47c538) --- .changes/unreleased/Fixes-20230505-132545.yaml | 6 ++++++ core/dbt/context/base.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Fixes-20230505-132545.yaml diff --git a/.changes/unreleased/Fixes-20230505-132545.yaml b/.changes/unreleased/Fixes-20230505-132545.yaml new file mode 100644 index 00000000000..8a7dd9bc2af --- /dev/null +++ b/.changes/unreleased/Fixes-20230505-132545.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Fix inverted `--print/--no-print` flag +time: 2023-05-05T13:25:45.949997-06:00 +custom: + Author: dbeatty10 thomasgjerdekog + Issue: "7517" diff --git a/core/dbt/context/base.py b/core/dbt/context/base.py index 99c1e09769a..1ac9fc239f0 100644 --- a/core/dbt/context/base.py +++ b/core/dbt/context/base.py @@ -652,7 +652,7 @@ def print(msg: str) -> str: {% endmacro %}" """ - if not get_flags().PRINT: + if get_flags().PRINT: print(msg) return ""