diff --git a/Library/Homebrew/utils/pypi.rb b/Library/Homebrew/utils/pypi.rb index d0d3a9e4a2..ee2351cc06 100644 --- a/Library/Homebrew/utils/pypi.rb +++ b/Library/Homebrew/utils/pypi.rb @@ -217,7 +217,7 @@ module PyPI ohai "Retrieving PyPI dependencies for \"#{input_packages.join(" ")}\"..." if !print_only && !silent command = [Formula["python"].bin/"python3", "-m", "pip", "install", "-q", "--dry-run", "--ignore-installed", "--report", "/dev/stdout", *input_packages.map(&:to_s)] - pipgrip_output = Utils.popen_read(*command, env: { "PIP_REQUIRE_VIRTUALENV" => "false" }) + pip_output = Utils.popen_read({ "PIP_REQUIRE_VIRTUALENV" => "false" }, *command) unless $CHILD_STATUS.success? odie <<~EOS Unable to determine dependencies for "#{input_packages.join(" ")}" because of a failure when running @@ -226,7 +226,7 @@ module PyPI EOS end - found_packages = json_to_packages(JSON.parse(pipgrip_output), main_package, exclude_packages).uniq + found_packages = json_to_packages(JSON.parse(pip_output), main_package, exclude_packages).uniq new_resource_blocks = "" found_packages.sort.each do |package|