Skip to content

Commit 8b34615

Browse files
committed
fix prettier command on spaces in path
1 parent 42151da commit 8b34615

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "superplate-cli",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "The frontend boilerplate with superpowers",
55
"license": "MIT",
66
"repository": {

src/saofile.ts

+4-7
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ const saoConfig: GeneratorConfig = {
6060
* Package Manager
6161
*/
6262

63-
sao.answers = {
64-
...sao.answers,
65-
pm: BinaryHelper.CanUseYarn() ? sao.answers.pm : "npm",
66-
};
63+
sao.answers.pm = BinaryHelper.CanUseYarn() ? sao.answers.pm : "npm";
6764

6865
const pmRun = sao.answers.pm === "yarn" ? "yarn" : "npm run";
6966

@@ -296,7 +293,7 @@ const saoConfig: GeneratorConfig = {
296293
/**
297294
* Format generated project
298295
*/
299-
await promisify(exec)(`npx prettier ${saoInstance.outDir} --write`);
296+
await promisify(exec)(`npx prettier "${saoInstance.outDir}" --write`);
300297

301298
/**
302299
* Create an initial commit
@@ -305,11 +302,11 @@ const saoConfig: GeneratorConfig = {
305302
try {
306303
// add
307304
await promisify(exec)(
308-
`git --git-dir=${saoInstance.outDir}/.git/ --work-tree=${saoInstance.outDir}/ add -A`,
305+
`git --git-dir="${saoInstance.outDir}"/.git/ --work-tree="${saoInstance.outDir}"/ add -A`,
309306
);
310307
// commit
311308
await promisify(exec)(
312-
`git --git-dir=${saoInstance.outDir}/.git/ --work-tree=${saoInstance.outDir}/ commit -m "initial commit with superplate"`,
309+
`git --git-dir="${saoInstance.outDir}"/.git/ --work-tree="${saoInstance.outDir}"/ commit -m "initial commit with superplate"`,
313310
);
314311
saoInstance.logger.info("created an initial commit.");
315312
} catch (_) {

0 commit comments

Comments
 (0)