* fix(core): move git commit to create-nx-workspace * fix(core): add git init to create-nx-plugin
14 lines
288 B
TypeScript
14 lines
288 B
TypeScript
import { execSync } from 'child_process';
|
|
|
|
export function deduceDefaultBase(): string {
|
|
const nxDefaultBase = 'main';
|
|
try {
|
|
return (
|
|
execSync('git config --get init.defaultBranch').toString().trim() ||
|
|
nxDefaultBase
|
|
);
|
|
} catch {
|
|
return nxDefaultBase;
|
|
}
|
|
}
|