Skip to content
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

[Bug] inject fails silently when after or before match nothing #404

Open
c-vetter opened this issue Aug 16, 2022 · 0 comments
Open

[Bug] inject fails silently when after or before match nothing #404

c-vetter opened this issue Aug 16, 2022 · 0 comments

Comments

@c-vetter
Copy link

When after or before fail to match, the current behaviors are both surprising and different from each other:

  • after injects at the start of the file
  • before seems to do nothing

Both cases are logged as inject giving the impression that all is well. These behaviors are problematic because in the before-case important code may go missing, and in the after-case the resulting file may be broken.

Both should actually leave the file alone and log as skipped so the developer is immediately informed instead of trying to run this potentially broken state in the assumption that the generator worked as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant