review fixes: align reproduction script timeout, tighten comments
This commit is contained in:
@@ -362,9 +362,10 @@ export const createOpenCodeEnvRuntime = (deps) => {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fast path: 'command -v' via plain sh (no login shell, no .zshrc sourcing).
|
// 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
|
// This is much faster than the full login shell probe below and catches
|
||||||
// standard brew paths even when launched with minimal PATH.
|
// 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') {
|
if (process.platform !== 'win32') {
|
||||||
try {
|
try {
|
||||||
const fastResult = runSpawnSync('/bin/sh', ['-c', 'command -v opencode'], {
|
const fastResult = runSpawnSync('/bin/sh', ['-c', 'command -v opencode'], {
|
||||||
@@ -454,9 +455,10 @@ export const createOpenCodeEnvRuntime = (deps) => {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fast path: 'command -v' via plain sh (no login shell, no .zshrc sourcing).
|
// 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
|
// This is much faster than the full login shell probe below and catches
|
||||||
// standard brew paths even when launched with minimal PATH.
|
// 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') {
|
if (process.platform !== 'win32') {
|
||||||
try {
|
try {
|
||||||
const fastResult = runSpawnSync('/bin/sh', ['-c', 'command -v node'], {
|
const fastResult = runSpawnSync('/bin/sh', ['-c', 'command -v node'], {
|
||||||
@@ -558,9 +560,10 @@ export const createOpenCodeEnvRuntime = (deps) => {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fast path: 'command -v' via plain sh (no login shell, no .zshrc sourcing).
|
// 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
|
// This is much faster than the full login shell probe below and catches
|
||||||
// standard brew paths even when launched with minimal PATH.
|
// 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') {
|
if (process.platform !== 'win32') {
|
||||||
try {
|
try {
|
||||||
const fastResult = runSpawnSync('/bin/sh', ['-c', 'command -v bun'], {
|
const fastResult = runSpawnSync('/bin/sh', ['-c', 'command -v bun'], {
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ async function main() {
|
|||||||
encoding: 'utf8',
|
encoding: 'utf8',
|
||||||
stdio: ['ignore', 'pipe', 'pipe'],
|
stdio: ['ignore', 'pipe', 'pipe'],
|
||||||
windowsHide: true,
|
windowsHide: true,
|
||||||
timeout: 10000,
|
timeout: 5000,
|
||||||
});
|
});
|
||||||
if (result.status === 0) {
|
if (result.status === 0) {
|
||||||
const found = (result.stdout || '').trim().split(/\s+/).pop() || '';
|
const found = (result.stdout || '').trim().split(/\s+/).pop() || '';
|
||||||
|
|||||||
Reference in New Issue
Block a user