Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit fca8e8a

Browse files
authored
Merge pull request #46 from event-catalog/set-default-value-for-project-dir
fix(plugin): set default value for plugin DIR
2 parents 74415c6 + 2b28973 commit fca8e8a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/eight-monkeys-wait.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@eventcatalog/generator-openapi": patch
3+
---
4+
5+
fix(plugin): set default value for plugin DIR

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ type Props = {
2121
};
2222

2323
export default async (_: any, options: Props) => {
24+
if (!process.env.PROJECT_DIR) {
25+
process.env.PROJECT_DIR = process.cwd();
26+
}
27+
2428
if (!process.env.PROJECT_DIR) {
2529
throw new Error('Please provide catalog url (env variable PROJECT_DIR)');
2630
}

0 commit comments

Comments
 (0)