Merge pull request #1611 from MikeMcQuaid/bash-test-race

bash_test: handle race condition.
This commit is contained in:
Mike McQuaid 2016-12-03 16:36:37 +00:00 committed by GitHub
commit 52691cd0de

View File

@ -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