diff options
| author | Mike McQuaid | 2016-12-03 15:59:05 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2016-12-03 15:59:05 +0000 |
| commit | 3f6d31dee1ab2ef84185899caca1011cb0b54345 (patch) | |
| tree | 865d2a22a68ec3c29b3e8f90361c4279bafca068 /Library | |
| parent | bc9d3afd6ed0da795148c8f31fc1d8e5167eed35 (diff) | |
| download | brew-3f6d31dee1ab2ef84185899caca1011cb0b54345.tar.bz2 | |
bash_test: handle race condition.
Other tests may delete Bash files (e.g. `shcmd.sh`) while tests are
ongoing so ensure this doesn't cause a test failure.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/test/bash_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/test/bash_test.rb b/Library/Homebrew/test/bash_test.rb index ff418c787..671ab5ec8 100644 --- a/Library/Homebrew/test/bash_test.rb +++ b/Library/Homebrew/test/bash_test.rb @@ -2,6 +2,7 @@ require "testing_env" class BashTests < Homebrew::TestCase def assert_valid_bash_syntax(file) + return unless file.exist? output = Utils.popen_read("/bin/bash -n #{file} 2>&1") assert $?.success?, output end |
