fix(utils): always use uv for submit when nix submit cmd unavailable

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.
This commit is contained in:
Barrett Ruth 2026-03-04 19:19:33 -05:00
parent 2854f5bb23
commit 128ff04621
Signed by: barrett
GPG key ID: A6C96C9349D2FC81

View file

@ -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