Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Support :environment variables with semicolons in their values #4
Allows :environment to be an array as well as tests to verify that :environment behaves as expected in both old and new behaviors. This preserves backwards compatibility with the old path splitting behavior.
Description: right now, Process.create() has no facility to create an environment variable containing a semicolon. This is a common practice in Windows, because it is the path separator. Both PATH and PATHEXT behave this way.
This fails because it splits the value of PATH apart
Process.create(:app_name => 'cmd /c echo %PATH%', :environment => 'A=B;PATH=C:\Windows;D:\Games')
This succeeds with this patch.
Process.create(:app_name => 'cmd /c echo %PATH%', :environment => ['A=B', 'PATH=C:\Windows;D:\Games'])