-
Notifications
You must be signed in to change notification settings - Fork 75
-o dist/my-parser.js errors if dist/ doesn't exist #440
Copy link
Copy link
Closed
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch peggy@3.0.2 for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/peggy/bin/peggy-cli.js b/node_modules/peggy/bin/peggy-cli.js
index b3130a0..0107699 100644
--- a/node_modules/peggy/bin/peggy-cli.js
+++ b/node_modules/peggy/bin/peggy-cli.js
@@ -439,6 +439,7 @@ class PeggyCLI extends Command {
return Promise.resolve(hasTest ? this.std.out : null);
}
return new Promise((resolve, reject) => {
+ fs.mkdirSync(path.dirname(this.outputFile), { recursive: true });
const outputStream = fs.createWriteStream(this.outputFile);
outputStream.on("error", reject);
outputStream.on("open", () => resolve(outputStream));This issue body was partially generated by patch-package.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels