From 1c443ac68004cd11632183c83087a796c7ce7dfd Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Thu, 16 Jun 2022 02:50:43 +0100 Subject: [PATCH] cmd/postgresql-upgrade-database: use ENV.fetch --- cmd/postgresql-upgrade-database.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/postgresql-upgrade-database.rb b/cmd/postgresql-upgrade-database.rb index d35cf69a1d3..8e413b52546 100755 --- a/cmd/postgresql-upgrade-database.rb +++ b/cmd/postgresql-upgrade-database.rb @@ -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?