-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loaded plopfiles do not respect the --force
flag
#392
Comments
Alright, as soon as I opened an issue, had an idea... (of course!) 💡 😁 I was actually using a loaded plop file from the main file, and that is what triggered this bug! So it looks like force is not being applied to loaded plopfiles.
|
--force
to work.--force
flag
That clarification is extremely helpful. Lemme see if I can take a stab at finding the root cause |
I think this is because we don't inherit any of the parent config props from our https://github.com/plopjs/plop/blob/main/packages/node-plop/src/node-plop.js#L102-L107 I could be wrong, but I think if we simply changed the const config = Object.assign(
plopCfg,
{
destBasePath: getDestBasePath(),
},
loadCfg
); It would fix this bug. Any chance you wanna pull it down, test my theory, maybe write a test to validate this fix, and make a PR? 😊 |
Your fix does indeed work! :) |
FYI I am working on a PR. |
BTW @moltar I deeply appreciate you having opened a PR. I'm working on TS support given our botched 4.0 release right now, but I will address your fix soon there after :) |
I know it worked on previous versions, and I suspect it might be my local setup, but want to raise an issue to see if there are any other leads, as I've spent over an hour trying to debug this, and so far no leads.
Running
Output:
.plop/plopfile.ts
contents:Version
Btw, if I use
force: true
on the action, then it works fine.The text was updated successfully, but these errors were encountered: