<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -80,7 +80,7 @@ class Rush::Box
 		return command unless env
 
 		vars = env.map do |key, value|
-			&quot;export #{key}='#{value}'&quot;
+			&quot;export #{key}=\&quot;#{value.gsub('&quot;', '\\&quot;')}\&quot;&quot;
 		end
 		vars.push(command).join(&quot;\n&quot;)
 	end</diff>
      <filename>lib/rush/box.rb</filename>
    </modified>
    <modified>
      <diff>@@ -38,7 +38,11 @@ describe Rush::Box do
 	end
 
 	it &quot;builds a script of environment variables to prefix the bash command&quot; do
-		@box.command_with_environment('cmd', { :a =&gt; 'b' }).should == &quot;export a='b'\ncmd&quot;
+		@box.command_with_environment('cmd', { :a =&gt; 'b' }).should == &quot;export a=\&quot;b\&quot;\ncmd&quot;
+	end
+
+	it &quot;escapes quotes on environment variables&quot; do
+		@box.command_with_environment('cmd', { :a =&gt; 'a&quot;b' }).should == &quot;export a=\&quot;a\\\&quot;b\&quot;\ncmd&quot;
 	end
 
 	it &quot;sets the environment variables from the provided hash&quot; do</diff>
      <filename>spec/box_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>353e63213c8c92e056bceb2e9e190469db74f710</id>
    </parent>
  </parents>
  <author>
    <name>Pedro Belo</name>
    <email>pedro@heroku.com</email>
  </author>
  <url>http://github.com/adamwiggins/rush/commit/ff4a873b965f84605bfbd6c8f5b47d4f05871c2d</url>
  <id>ff4a873b965f84605bfbd6c8f5b47d4f05871c2d</id>
  <committed-date>2009-11-05T11:05:57-08:00</committed-date>
  <authored-date>2009-11-05T11:05:57-08:00</authored-date>
  <message>define env vars with double quotes, and escaping the values</message>
  <tree>2e653d21bb9a8e945927478b7f9815cfb17bd4d2</tree>
  <committer>
    <name>Pedro Belo</name>
    <email>pedro@heroku.com</email>
  </committer>
</commit>
