mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-24 02:29:13 +00:00
Compare commits
3 Commits
copilot/fi
...
mingholy/f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb5ad43ca7 | ||
|
|
650079b0c7 | ||
|
|
48d2df5342 |
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user