tests: Use system_command rather than popen_read

Co-Authored-By: sjackman <sjackman@gmail.com>
This commit is contained in:
Markus Reiter 2019-02-20 11:33:00 -08:00 committed by GitHub
parent cb0fe44af3
commit c74799fe8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,7 @@ module Homebrew
ENV["HOMEBREW_TEST_GENERIC_OS"] = "1" if args.generic? ENV["HOMEBREW_TEST_GENERIC_OS"] = "1" if args.generic?
ENV["HOMEBREW_TEST_ONLINE"] = "1" if args.online? ENV["HOMEBREW_TEST_ONLINE"] = "1" if args.online?
ENV["USER"] ||= Utils.popen_read("id", "-nu").chomp ENV["USER"] ||= system_command!("id", args: ["-nu"]).stdout.chomp
# Avoid local configuration messing with tests e.g. git being configured # Avoid local configuration messing with tests e.g. git being configured
# to use GPG to sign by default # to use GPG to sign by default