Skip to content

Commit

Permalink
fix(cli): use prefix flag to set cwd for schema generation (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewvolk authored Mar 18, 2024
1 parent 58ca3eb commit efd6387
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/gentle-countries-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/create-catalyst": patch
---

use `--prefix` npm flag to set `cwd` for GraphQL schema generation insead of `exec`'s `cwd` option
2 changes: 1 addition & 1 deletion packages/create-catalyst/src/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export const create = async (options: CreateCommandOptions) => {

await installDependencies(projectDir, packageManager);

await spinner(exec(`${packageManager} run generate`, { cwd: projectDir }), {
await spinner(exec(`${packageManager} run --prefix ${projectDir} generate`), {
text: 'Creating GraphQL schema...',
successText: 'Created GraphQL schema',
failText: (err) => chalk.red(`Failed to create GraphQL schema: ${err.message}`),
Expand Down

0 comments on commit efd6387

Please sign in to comment.