sh: flush stdout before executing the shell

Closes Homebrew/homebrew#48268.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
This commit is contained in:
Baptiste Fontaine 2016-01-20 00:29:14 +01:00
parent 026363e1ed
commit 861910b85f
2 changed files with 6 additions and 0 deletions

View File

@ -24,6 +24,7 @@ module Homebrew
ignore our configuration.
When done, type `exit'.
EOS
$stdout.flush
exec ENV["SHELL"]
end
end

View File

@ -284,6 +284,11 @@ class IntegrationCommandTests < Homebrew::TestCase
(HOMEBREW_REPOSITORY/".git").unlink
end
def test_sh
assert_match "Your shell has been configured",
cmd("sh", {"SHELL" => "/usr/bin/true"})
end
def test_custom_command
mktmpdir do |path|
cmd = "int-test-#{rand}"