Skip to content
This repository
Browse code

Merge pull request #56 from grosser/tty

make connection tty so we preserve colors
  • Loading branch information...
commit 37bf7ee7d18ce613737769ff6348b7ad44dd6d3a 2 parents 88a1dc2 + 1973788
Jesse Storimer authored July 22, 2012

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  bin/spin
7  bin/spin
@@ -179,8 +179,14 @@ def fork_and_run(files, push_results, test_framework, conn)
179 179
     # To push the test results to the push process instead of having them
180 180
     # displayed by the server, we reopen $stdout/$stderr to the open
181 181
     # connection.
  182
+    tty = files.delete "tty?"
182 183
     if push_results
183 184
       $stdout.reopen(conn)
  185
+      if tty
  186
+        def $stdout.tty?
  187
+          true
  188
+        end
  189
+      end
184 190
       $stderr.reopen(conn)
185 191
     end
186 192
 
@@ -245,6 +251,7 @@ def push
245 251
     Dir.chdir root_path
246 252
   end
247 253
 
  254
+  files_to_load << "tty?" if $stdout.tty?
248 255
   f = files_to_load.join(SEPARATOR)
249 256
 
250 257
   abort if f.empty?

0 notes on commit 37bf7ee

Please sign in to comment.
Something went wrong with that request. Please try again.