cmd/postgresql-upgrade-database: use ENV.fetch

master
Bo Anderson 2022-06-16 02:50:43 +01:00 committed by FX Coudert
parent 1676fcbb9c
commit 1c443ac680
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ module Homebrew
]
locale_settings.each do |setting|
sql = "SELECT setting FROM pg_settings WHERE name LIKE '#{setting}';"
value = Utils.popen_read("#{old_bin}/psql", "postgres", "-qtAX", "-U", ENV["USER"], "-c", sql).strip
value = Utils.popen_read("#{old_bin}/psql", "postgres", "-qtAX", "-U", ENV.fetch("USER"), "-c", sql).strip
next if value.empty?