Compare commits

..

3 Commits

Author SHA1 Message Date
mingholy.lmh
cb5ad43ca7 fix: sandbox exception log to stderr 2025-11-23 17:32:48 +08:00
mingholy.lmh
650079b0c7 fix: failed json-output tests 2025-11-21 18:34:02 +08:00
mingholy.lmh
48d2df5342 fix: reset authType settings 2025-11-21 17:50:10 +08:00
2 changed files with 18 additions and 32 deletions

View File

@@ -224,4 +224,5 @@ jobs:
run: |-
gh issue create \
--title "Release Failed for ${RELEASE_TAG} on $(date +'%Y-%m-%d')" \
--body "The release workflow failed. See the full run for details: ${DETAILS_URL}"
--body "The release workflow failed. See the full run for details: ${DETAILS_URL}" \
--label "kind/bug,release-failure"

View File

@@ -517,39 +517,24 @@ export function resolveCommandPath(command: string): {
try {
const isWin = process.platform === 'win32';
if (isWin) {
const checkCommand = 'where.exe';
const checkArgs = [command];
const checkCommand = isWin ? 'where' : 'command';
const checkArgs = isWin ? [command] : ['-v', command];
let result: string | null = null;
try {
result = execFileSync(checkCommand, checkArgs, {
encoding: 'utf8',
shell: false,
}).trim();
} catch {
return { path: null, error: undefined };
}
return result ? { path: result } : { path: null };
} else {
const shell = '/bin/sh';
const checkArgs = ['-c', `command -v ${escapeShellArg(command, 'bash')}`];
let result: string | null = null;
try {
result = execFileSync(shell, checkArgs, {
encoding: 'utf8',
shell: false,
}).trim();
} catch {
return { path: null, error: undefined };
}
if (!result) return { path: null, error: undefined };
accessSync(result, fsConstants.X_OK);
return { path: result, error: undefined };
let result: string | null = null;
try {
result = execFileSync(checkCommand, checkArgs, {
encoding: 'utf8',
shell: isWin,
}).trim();
} catch {
console.warn(`Command ${checkCommand} not found`);
}
if (!result) return { path: null, error: undefined };
if (!isWin) {
accessSync(result, fsConstants.X_OK);
}
return { path: result, error: undefined };
} catch (error) {
return {
path: null,