mirror of
https://git.um-react.app/um/um-react.git
synced 2025-11-28 03:23:02 +00:00
chore: bump version to v0.4.7; upgrade deps
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user