Skip to content

Commit fc38b96

Browse files
committed
v0.3.4 git cd
1 parent 803a742 commit fc38b96

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generator-bitloops",
3-
"version": "0.3.3",
3+
"version": "0.3.4",
44
"description": "Next.js with TypeScript, Tailwind, Storybook and Cypress generator by Bitloops",
55
"license": "MIT",
66
"author": "Bitloops S.A.",

setup/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,11 @@ export default class extends Generator {
200200

201201
this.commitChanges = async function() {
202202
this.log('Committing changes to git...');
203-
await new Promise((resolve, error) => {exec('git add . && git commit -m "Initial setup"').on('exit', (code) => {
203+
await new Promise((resolve) => {exec(`cd ${toKebabCase(this.options.project)} && git add . && git commit -m "Initial setup"`).on('exit', (code) => {
204+
if (code !== 0) {
205+
this.log('Error committing changes to git! ', code);
206+
resolve();
207+
}
204208
this.log('Git changes committed!');
205209
resolve();
206210
});});

0 commit comments

Comments
 (0)