create-solostack 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils/git.js +9 -1
package/package.json
CHANGED
package/src/utils/git.js
CHANGED
|
@@ -65,5 +65,13 @@ prisma/migrations/
|
|
|
65
65
|
await execa('git', ['add', '-A'], { cwd: projectPath });
|
|
66
66
|
|
|
67
67
|
// Create initial commit
|
|
68
|
-
|
|
68
|
+
try {
|
|
69
|
+
await execa('git', ['commit', '-m', 'Initial commit from create-solostack'], { cwd: projectPath });
|
|
70
|
+
} catch (error) {
|
|
71
|
+
// Ignore "nothing to commit" errors (happens if re-running in same dir)
|
|
72
|
+
const isNothingToCommit = error.stdout?.includes('nothing to commit') || error.stderr?.includes('nothing to commit');
|
|
73
|
+
if (!isNothingToCommit) {
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
69
77
|
}
|