Commit 3905a07
Fix CI failure by skipping version validation during generator runtime
The strict version validation added in #1881 runs during Rails initialization
via an after_initialize hook. However, when running `rails generate react_on_rails:install`,
the npm packages haven't been installed yet, causing the validation to fail with:
"No React on Rails npm package is installed."
This fix adds a check to skip validation when running Rails generators (detected by
checking if ARGV.first is "generate" or "g"). The generator will install packages
during its execution, so validation at initialization time is not appropriate.
This allows CI to successfully run example generation tasks without errors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 777bee2 commit 3905a07
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
0 commit comments