From ca918cb8753dde297e19e0f59ca825e8b1202d1d Mon Sep 17 00:00:00 2001 From: Ivan Tse Date: Tue, 25 Feb 2014 22:49:24 -0500 Subject: [PATCH] Check to abort and log output before adding `tty?` There are two consequences of this change. First, `files_to_load` will abort if there are no valid files. Before this change, spin would push to the server. Secondly, having `tty?` in the log output is a little confusing. This change makes the log output more clear. --- lib/spin.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/spin.rb b/lib/spin.rb index 53576de..37bd562 100644 --- a/lib/spin.rb +++ b/lib/spin.rb @@ -118,11 +118,10 @@ def push(argv, options) Dir.chdir root_path end - files_to_load << "tty?" if $stdout.tty? - abort if files_to_load.empty? logger.info "Spinning up #{files_to_load.join(" ")}" + files_to_load << "tty?" if $stdout.tty? send_files_to_serve(files_to_load, options[:trailing_pushed_args] || []) end