This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new d785ca28fcd fix(breeze): use prek from breeze bin instead of PATH 
(#62277)
d785ca28fcd is described below

commit d785ca28fcd837e1b7a2692f4ec038b0092a9185
Author: SeonghwanLee <[email protected]>
AuthorDate: Mon Mar 2 21:44:11 2026 +0900

    fix(breeze): use prek from breeze bin instead of PATH (#62277)
    
    * fix(breeze): use prek from breeze bin instead of PATH
    
    * Apply review of @CarliJoy - shutil.which
    
    * Apply python -m prek
---
 .pre-commit-config.yaml                          |  2 +-
 dev/breeze/src/airflow_breeze/utils/run_utils.py | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 077b5ffd526..694f2706173 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -16,7 +16,7 @@
 # under the License.
 ---
 default_stages: [pre-commit, pre-push]
-minimum_prek_version: '0.3.2'
+minimum_prek_version: '0.3.4'
 default_language_version:
   python: python3
   node: 22.19.0
diff --git a/dev/breeze/src/airflow_breeze/utils/run_utils.py 
b/dev/breeze/src/airflow_breeze/utils/run_utils.py
index 0367304bd22..e7cef85fd50 100644
--- a/dev/breeze/src/airflow_breeze/utils/run_utils.py
+++ b/dev/breeze/src/airflow_breeze/utils/run_utils.py
@@ -225,12 +225,11 @@ def assert_prek_installed():
     prek_config = yaml.safe_load((AIRFLOW_ROOT_PATH / 
".pre-commit-config.yaml").read_text())
     min_prek_version = prek_config["minimum_prek_version"]
 
-    python_executable = sys.executable
-    get_console().print(f"[info]Checking prek installed for 
{python_executable}[/]")
+    get_console().print(f"[info]Checking prek installed for 
{sys.executable}[/]")
     need_to_reinstall_prek = False
     try:
         command_result = run_command(
-            ["prek", "--version"],
+            [sys.executable, "-m", "prek", "--version"],
             capture_output=True,
             text=True,
             check=False,
@@ -261,10 +260,7 @@ def assert_prek_installed():
         need_to_reinstall_prek = True
         get_console().print(f"\n[error]Error checking for prek installation: 
[/]\n{e}\n")
     if need_to_reinstall_prek:
-        get_console().print("[info]Make sure to install prek. For example by 
running:\n")
-        get_console().print("   uv tool install prek\n")
-        get_console().print("Or if you prefer pipx:\n")
-        get_console().print("   pipx install prek")
+        get_console().print("[info]Reinstall breeze: 'uv tool install -e 
./dev/breeze --force'[/]")
         sys.exit(1)
 
 
@@ -537,6 +533,8 @@ def run_compile_ui_assets(
             "[info]However, it requires you to have local pnpm installation.\n"
         )
     command_to_execute = [
+        sys.executable,
+        "-m",
         "prek",
         "run",
         "--hook-stage",

Reply via email to