stripe / subprocess

A port of Python's subprocess module to Ruby
MIT License
209 stars 17 forks source link

Use block form of Dir.chdir #29

Closed andrew-stripe closed 7 years ago

andrew-stripe commented 7 years ago

This switches from calling FileUtils.cd (an alias for Dir.chdir) to using the block form of Dir.chdir. Unless you use the block form, invoking Subprocess with the cwd option within another chdir block triggers a warning message on the console from: https://github.com/ruby/ruby/blob/v2_4_1/dir.c#L1033-L1034

I recommend reviewing with ?w=1 since this is almost all whitespace change.

r? @nelhage cc @stripe/product-infra

nelhage-stripe commented 7 years ago

:+1:

andrew-stripe commented 7 years ago

Pretty sure the test failure is a flaky test since I ran the tests on both macOS and Ubuntu.