Skip to content

Commit c657356

Browse files
committed
fix: fix initializing git repo
1 parent aef70d2 commit c657356

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/create.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,11 @@ export default async function create(argv: yargs.Arguments<any>) {
210210
}
211211

212212
try {
213-
await spawn.sync(
214-
'git init && git add . && git commit -m "chore: initial commit"',
215-
{ cwd: folder }
216-
);
213+
spawn.sync('git', ['init'], { cwd: folder });
214+
spawn.sync('git', ['add', '.'], { cwd: folder });
215+
spawn.sync('git', ['commit', '-m', 'chore: initial commit'], {
216+
cwd: folder,
217+
});
217218
} catch (e) {
218219
// Ignore error
219220
}

0 commit comments

Comments
 (0)