Skip to content

Commit 6bfe665

Browse files
committed
Fix rails db:system:change command failure issue
1 parent 184ecda commit 6bfe665

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/spring/client/rails.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def call
2020

2121
if COMMANDS.include?(command_name)
2222
Run.call(["rails_#{command_name}", *args.drop(2)])
23-
elsif command_name&.start_with?("db:")
23+
elsif command_name&.start_with?("db:") && !command_name.start_with?("db:system")
2424
Run.call(["rake", *args.drop(1)])
2525
else
2626
require "spring/configuration"

test/support/acceptance_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,10 @@ def exec_name
702702
2.times { app.run "bin/rails db:migrate" }
703703
end
704704
end
705+
706+
test "rails db:system:change" do
707+
assert_success "bin/rails db:system:change --to=sqlite3"
708+
end
705709
end
706710
end
707711
end

0 commit comments

Comments
 (0)