Skip to content

Commit

Permalink
fix: support spaces in projectDIR path (event-catalog#328)
Browse files Browse the repository at this point in the history
Co-authored-by: Andre <[email protected]>
Co-authored-by: David Boyne <[email protected]>
  • Loading branch information
3 people authored Jul 3, 2023
1 parent 2aeb419 commit 264b6c8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/short-items-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@eventcatalog/core": patch
---

fix: support spaces in projectDIR path
12 changes: 6 additions & 6 deletions packages/eventcatalog/bin/eventcatalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cli
.command('start [siteDir]')
.description('Start the development server.')
.action(() => {
execSync(`cross-env PROJECT_DIR=${projectDIR} npm run start`, {
execSync(`cross-env PROJECT_DIR='${projectDIR}' npm run start`, {
cwd: eventCatalogLibDir,
stdio: 'inherit',
});
Expand All @@ -51,13 +51,13 @@ cli
fs.copySync(path.join(projectDIR, 'public'), path.join(eventCatalogLibDir, 'public'));

// Move the schemas into public directory so we can download them from UI
execSync(`cross-env PROJECT_DIR=${projectDIR} npm run scripts:move-schema-for-download`, {
execSync(`cross-env PROJECT_DIR='${projectDIR}' npm run scripts:move-schema-for-download`, {
cwd: eventCatalogLibDir,
stdio: 'inherit',
});

// build using nextjs
execSync(`cross-env PROJECT_DIR=${projectDIR} npm run build`, {
execSync(`cross-env PROJECT_DIR='${projectDIR}' npm run build`, {
cwd: eventCatalogLibDir,
stdio: 'inherit',
});
Expand All @@ -82,12 +82,12 @@ cli
fs.copyFileSync(path.join(projectDIR, 'eventcatalog.config.js'), path.join(eventCatalogLibDir, 'eventcatalog.config.js'));

// Move the schemas into public directory so we can download them from UI
execSync(`cross-env PROJECT_DIR=${projectDIR} npm run scripts:move-schema-for-download`, {
execSync(`cross-env PROJECT_DIR='${projectDIR}' npm run scripts:move-schema-for-download`, {
cwd: eventCatalogLibDir,
stdio: 'inherit',
});

execSync(`cross-env PROJECT_DIR=${projectDIR} npm run dev`, {
execSync(`cross-env PROJECT_DIR='${projectDIR}' npm run dev`, {
cwd: eventCatalogLibDir,
stdio: 'inherit',
});
Expand All @@ -105,7 +105,7 @@ cli

fs.copyFileSync(path.join(projectDIR, 'eventcatalog.config.js'), path.join(eventCatalogLibDir, 'eventcatalog.config.js'));

execSync(`cross-env PROJECT_DIR=${projectDIR} npm run generate`, {
execSync(`cross-env PROJECT_DIR='${projectDIR}' npm run generate`, {
cwd: eventCatalogLibDir,
stdio: 'inherit',
});
Expand Down

0 comments on commit 264b6c8

Please sign in to comment.