forked from defunkt/toes
Fix git init failing when no default branch or user config is set
This commit is contained in:
parent
7588ef5564
commit
0e467a1bdf
|
|
@ -147,9 +147,9 @@ router.post('/', async c => {
|
|||
|
||||
const run = (cmd: string[]) => Bun.spawn(cmd, { cwd: tmpDir, stdout: 'ignore', stderr: 'ignore' }).exited
|
||||
|
||||
await run(['git', 'init'])
|
||||
await run(['git', 'init', '-b', 'main'])
|
||||
await run(['git', 'add', '.'])
|
||||
await run(['git', 'commit', '-m', 'init'])
|
||||
await run(['git', '-c', 'user.name=toes', '-c', 'user.email=toes@localhost', 'commit', '-m', 'init'])
|
||||
await run(['git', 'remote', 'add', 'toes', gitUrl(name)])
|
||||
const exitCode = await run(['git', 'push', 'toes', 'main'])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user