From 5801e7f4562e10c75d2bf2a5e9f7d594f3b6b30a Mon Sep 17 00:00:00 2001 From: aaronskiba Date: Sat, 6 Jul 2024 16:53:19 -0600 Subject: [PATCH] Edit copy of credentials file within `bin/setup` Prior to this commit, the Rails credentials were not being updated during this setup process. --- bin/setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/setup b/bin/setup index 54cd0c40a1..19b9853e7b 100755 --- a/bin/setup +++ b/bin/setup @@ -30,7 +30,7 @@ if valid_db cp ".env.#{db_adapter}", '.env' puts "\n== Preparing credentials file ==" - system! "EDITOR='echo \"$(cat config/credentials.yml.#{db_adapter})\" >' bin/rails credentials:edit" + system!("EDITOR=\"sh -c 'echo \\\"$(cat config/credentials.yml.#{db_adapter})\\\" > \\\"\\\$1\\\"' --\" bin/rails credentials:edit") # Set the editor based on the platform ENV['EDITOR'] = Gem.win_platform? ? 'code --wait' : 'vim'