fix: restore fast-path comment indentation, correct reproduce script claim
Address bot review findings: - Indent the three 'Fast path' comment blocks to match surrounding code - Reproduce script header no longer claims the fast path catches brew paths with a minimal PATH — the hardcoded fallbacks do that; the fast path only sees binaries already in the inherited PATH
This commit is contained in:
@@ -455,10 +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
|
||||
// brew paths when the Electron login shell env merge already augmented PATH
|
||||
// or when /bin/sh has a broader default PATH than the process.
|
||||
// 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'], {
|
||||
@@ -548,10 +548,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
|
||||
// brew paths when the Electron login shell env merge already augmented PATH
|
||||
// or when /bin/sh has a broader default PATH than the process.
|
||||
// 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'], {
|
||||
@@ -653,10 +653,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
|
||||
// brew paths when the Electron login shell env merge already augmented PATH
|
||||
// or when /bin/sh has a broader default PATH than the process.
|
||||
// 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'], {
|
||||
|
||||
Reference in New Issue
Block a user