chore: bump version to v0.4.7; upgrade deps

This commit is contained in:
鲁树人
2025-03-31 04:03:45 +09:00
parent 88cfbcd337
commit d91e2fffe4
11 changed files with 2273 additions and 2041 deletions

View File

@@ -5,13 +5,13 @@ import url from 'node:url';
const projectRoot = url.fileURLToPath(new URL('../', import.meta.url));
export function command(cmd: string, dir = '') {
return cp.execSync(cmd, { cwd: path.join(projectRoot, dir), encoding: 'utf-8' }).trim();
return cp.execSync(cmd, { cwd: path.resolve(projectRoot, dir), encoding: 'utf-8' }).trim();
}
export function tryCommand(cmd: string, dir = '', fallback = '') {
try {
return command(cmd, dir);
} catch (e) {
} catch {
return fallback;
}
}