Skip to content

Commit 3e4b5a6

Browse files
justin808claude
andcommitted
fix: Only remove default files when Shakapacker pre-exists
Only remove default bin/dev and config/shakapacker.yml files if Shakapacker is already configured before running the React on Rails installer. This prevents us from deleting files that we create ourselves during the installation process. The logic now: - IF Shakapacker already configured → remove default conflicting files - IF Shakapacker NOT configured → we'll install it, don't remove our own files This fixes the CI failure where shakapacker.yml was being removed after we created it, causing subsequent steps to fail. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent a43f052 commit 3e4b5a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/generators/react_on_rails/install_generator.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ class InstallGenerator < Rails::Generators::Base
3838

3939
def run_generators
4040
if installation_prerequisites_met? || options.ignore_warnings?
41-
remove_default_gem_files
41+
# Only remove default files if Shakapacker is already configured
42+
# If it's not configured, we'll install it ourselves and shouldn't delete what we create
43+
remove_default_gem_files if shakapacker_configured?
4244
invoke_generators
4345
add_bin_scripts
4446
# Only add the post install message if not using Redux

0 commit comments

Comments
 (0)