mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-11 04:00:38 +00:00
test(code-runtime-python): resolve the interpreter path in the shell wrappers
The review's portability warning: the six shell wrappers exec'd a bare
'python3', which /bin/sh resolves against its compiled-in default PATH while
the runtime spawns with env:{} — in environments where python3 is reachable
only through the caller's PATH (Nix, pyenv) every wrapper run would fail as
worker-exit. The wrappers now bake the resolved absolute interpreter path
(module-level resolvePythonBin, which the product spawn already uses), and
resolvePythonBin is exported for the tests.
This commit is contained in:
@@ -393,7 +393,7 @@ export function readProcessStart(pid: number): string | undefined {
|
||||
* @param bin - the configured interpreter (absolute path or bare command).
|
||||
* @returns an absolute path when resolvable, else `bin` unchanged.
|
||||
*/
|
||||
function resolvePythonBin(bin: string): string {
|
||||
export function resolvePythonBin(bin: string): string {
|
||||
if (isAbsolute(bin) || bin.includes('/')) return bin
|
||||
const path = process.env.PATH
|
||||
/* v8 ignore next -- PATH is set in every environment the runtime boots in; the guard is defensive. */
|
||||
|
||||
Reference in New Issue
Block a user