Skip to content

Commit f8ab8d7

Browse files
committed
fix(dispatcher): use OMNIPKG_VENV_ROOT env var in shim swap check (venv_root not yet declared)
1 parent 197ab2d commit f8ab8d7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/omnipkg/dispatcher.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,9 +1258,10 @@ int main(int argc, char **argv) {
12581258
/* In swap context, execv directly to the swapped Python — don't wrap in dispatcher */
12591259
const char *swap_active = getenv("_OMNIPKG_SWAP_ACTIVE");
12601260
const char *swap_ver = getenv("OMNIPKG_PYTHON");
1261-
if (swap_active && swap_ver && venv_root[0]) {
1261+
const char *_swap_venv = getenv("OMNIPKG_VENV_ROOT");
1262+
if (swap_active && swap_ver && _swap_venv && _swap_venv[0]) {
12621263
char swap_py[MAX_PATH] = "";
1263-
registry_lookup(venv_root, swap_ver, swap_py, sizeof(swap_py));
1264+
registry_lookup(_swap_venv, swap_ver, swap_py, sizeof(swap_py));
12641265
if (swap_py[0] && file_exists(swap_py)) {
12651266
if (debug) fprintf(stderr, "[C-DISPATCH] swap shim → execv %s\n", swap_py);
12661267
argv[0] = swap_py;

0 commit comments

Comments
 (0)