diff --git a/clouds/postgres/common/run_script.py b/clouds/postgres/common/run_script.py index fcf9570e6..4d89ce134 100644 --- a/clouds/postgres/common/run_script.py +++ b/clouds/postgres/common/run_script.py @@ -42,9 +42,11 @@ def run_queries(queries): except Exception as error: error_msg = str(error) print(f'ERROR: {error_msg}') + exit(1) else: try: run_queries(split(content)) except Exception as error: error_msg = str(error) print(f'[{function}] ERROR: {error_msg}') + exit(1) diff --git a/clouds/redshift/common/run_script.py b/clouds/redshift/common/run_script.py index d6574d048..1d0a3e53f 100644 --- a/clouds/redshift/common/run_script.py +++ b/clouds/redshift/common/run_script.py @@ -42,3 +42,4 @@ def run_queries(queries): except ProgrammingError as error: error_msg = re.search("'M': '(.*?)',", str(error)).group(1) print(f'[{function}] ERROR: {error_msg}') + exit(1)