runner(selfhost): apply child_env::apply_core_wrapper_env to Python harness/PyVM spawns (unify child env). docs: CURRENT_TASK P1(part‑1) progress recorded.

This commit is contained in:
nyash-codex
2025-11-02 07:26:26 +09:00
parent 7180579cf8
commit 289dd0d5ab
2 changed files with 15 additions and 1 deletions

View File

@ -208,6 +208,7 @@ impl NyashRunner {
let py = std::path::Path::new("tools/ny_parser_mvp.py");
if py.exists() {
let mut cmd = std::process::Command::new(&py3);
crate::runner::child_env::apply_core_wrapper_env(&mut cmd);
cmd.arg(py).arg(&tmp_path);
let timeout_ms: u64 = std::env::var("NYASH_NY_COMPILER_TIMEOUT_MS")
.ok()
@ -313,7 +314,9 @@ impl NyashRunner {
else if allow_top && module.functions.contains_key("main") { "main" }
else if module.functions.contains_key("main") { eprintln!("[entry] Warning: using top-level 'main' without explicit allow; set NYASH_ENTRY_ALLOW_TOPLEVEL_MAIN=1 to silence."); "main" }
else { "Main.main" };
let status = std::process::Command::new(py3)
let mut cmd = std::process::Command::new(py3);
crate::runner::child_env::apply_core_wrapper_env(&mut cmd);
let status = cmd
.args(["tools/pyvm_runner.py", "--in", &mir_json_path.display().to_string(), "--entry", entry])
.status()
.map_err(|e| format!("spawn pyvm: {}", e))