From 128ff046216d4a6821c7ee8fae387b72a8f4c5b1 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Wed, 4 Mar 2026 19:19:33 -0500 Subject: [PATCH] fix(utils): always use uv for submit when nix submit cmd unavailable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: In a dev checkout on NixOS, `_nix_submit_cmd` is nil but `_nix_python` is set from the discovery cache. `get_python_submit_cmd` fell through to `get_python_cmd`, which returned the nix-built Python — a derivation that deliberately excludes `scrapling`. Solution: Fall back to `uv run` instead of `get_python_cmd` so submit always gets a full dependency environment when `_nix_submit_cmd` is nil. --- lua/cp/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/cp/utils.lua b/lua/cp/utils.lua index 9852bb5..578ca6c 100644 --- a/lua/cp/utils.lua +++ b/lua/cp/utils.lua @@ -119,7 +119,7 @@ function M.get_python_submit_cmd(module, plugin_path) if _nix_submit_cmd then return { _nix_submit_cmd, 'run', '--directory', plugin_path, '-m', 'scrapers.' .. module } end - return M.get_python_cmd(module, plugin_path) + return { 'uv', 'run', '--directory', plugin_path, '-m', 'scrapers.' .. module } end local python_env_setup = false