diff options
| author | Baptiste Fontaine | 2016-01-20 00:29:14 +0100 |
|---|---|---|
| committer | Baptiste Fontaine | 2016-01-20 11:37:42 +0100 |
| commit | 861910b85fd1521b14b0c40ec1013b229d1061ff (patch) | |
| tree | f93fb6679865a18c75beac2bc58e38e157f47ff7 /Library | |
| parent | 026363e1edff723217d72d9ac0d38f699d9ed850 (diff) | |
| download | brew-861910b85fd1521b14b0c40ec1013b229d1061ff.tar.bz2 | |
sh: flush stdout before executing the shell
Closes Homebrew/homebrew#48268.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/sh.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_integration_cmds.rb | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/sh.rb b/Library/Homebrew/cmd/sh.rb index bc09d4850..5ada75ab2 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 eaab307b6..47a288d71 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}" |
