review fixes: align reproduction script timeout, tighten comments

This commit is contained in:
Mayuresh Kadu
2026-06-20 09:35:11 +01:00
parent df669a4ded
commit 2cbbf3ab15
2 changed files with 13 additions and 10 deletions
@@ -362,9 +362,10 @@ export const createOpenCodeEnvRuntime = (deps) => {
return null;
}
// Fast path: 'command -v' via plain sh (no login shell, no .zshrc sourcing).
// This is much faster than the full login shell probe below and catches
// standard brew paths even when launched with minimal PATH.
// Fast path: 'command -v' via plain sh (no login shell, no .zshrc sourcing).
// This is much faster than the full login shell probe below and catches
// brew paths when the Electron login shell env merge already augmented PATH
// or when /bin/sh has a broader default PATH than the process.
if (process.platform !== 'win32') {
try {
const fastResult = runSpawnSync('/bin/sh', ['-c', 'command -v opencode'], {
@@ -454,9 +455,10 @@ export const createOpenCodeEnvRuntime = (deps) => {
return null;
}
// Fast path: 'command -v' via plain sh (no login shell, no .zshrc sourcing).
// This is much faster than the full login shell probe below and catches
// standard brew paths even when launched with minimal PATH.
// Fast path: 'command -v' via plain sh (no login shell, no .zshrc sourcing).
// This is much faster than the full login shell probe below and catches
// brew paths when the Electron login shell env merge already augmented PATH
// or when /bin/sh has a broader default PATH than the process.
if (process.platform !== 'win32') {
try {
const fastResult = runSpawnSync('/bin/sh', ['-c', 'command -v node'], {
@@ -558,9 +560,10 @@ export const createOpenCodeEnvRuntime = (deps) => {
return null;
}
// Fast path: 'command -v' via plain sh (no login shell, no .zshrc sourcing).
// This is much faster than the full login shell probe below and catches
// standard brew paths even when launched with minimal PATH.
// Fast path: 'command -v' via plain sh (no login shell, no .zshrc sourcing).
// This is much faster than the full login shell probe below and catches
// brew paths when the Electron login shell env merge already augmented PATH
// or when /bin/sh has a broader default PATH than the process.
if (process.platform !== 'win32') {
try {
const fastResult = runSpawnSync('/bin/sh', ['-c', 'command -v bun'], {
+1 -1
View File
@@ -252,7 +252,7 @@ async function main() {
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
windowsHide: true,
timeout: 10000,
timeout: 5000,
});
if (result.status === 0) {
const found = (result.stdout || '').trim().split(/\s+/).pop() || '';