mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Handle paths with spaces when editing credentials
Fixes https://github.com/rails/rails/issues/41617 Co-authored-by: Alexander Riccio <alexander@riccio.com> Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
This commit is contained in:
parent
317547e0e7
commit
5ca37eae12
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "pathname"
|
||||
require "shellwords"
|
||||
require "active_support"
|
||||
require "rails/command/helpers/editor"
|
||||
require "rails/command/environment_argument"
|
||||
|
@ -91,7 +92,7 @@ module Rails
|
|||
|
||||
def change_credentials_in_system_editor
|
||||
credentials.change do |tmp_path|
|
||||
system("#{ENV["EDITOR"]} #{tmp_path}")
|
||||
system("#{ENV["EDITOR"]} #{Shellwords.escape(tmp_path)}")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue