diff --git a/Library/Homebrew/cmd/sh.rb b/Library/Homebrew/cmd/sh.rb index bc09d48508..5ada75ab25 100644 --- a/Library/Homebrew/cmd/sh.rb +++ b/Library/Homebrew/cmd/sh.rb @@ -24,6 +24,7 @@ module Homebrew ignore our configuration. When done, type `exit'. EOS + $stdout.flush exec ENV["SHELL"] end end diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb index eaab307b66..47a288d719 100644 --- a/Library/Homebrew/test/test_integration_cmds.rb +++ b/Library/Homebrew/test/test_integration_cmds.rb @@ -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}"