review fixes: align reproduction script timeout, tighten comments
This commit is contained in:
@@ -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'], {
|
||||
|
||||
@@ -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() || '';
|
||||
|
||||
Reference in New Issue
Block a user