lib/scide/screen.rb in scide-0.0.11 vs lib/scide/screen.rb in scide-0.0.12
- old
+ new
@@ -1,5 +1,7 @@
+require 'which_works'
+
module Scide
# Configuration of a GNU Screen session (windows for a specific project).
#
# The configuration will disable the startup message and display a hardstatus line.
@@ -39,10 +41,10 @@
end
# Verifies that the screen binary is there. If not, causes scide
# to fail with a <tt>screen_not_found</tt> error (see {Scide.fail}).
def check_binary
- Scide.fail :screen_not_found, "ERROR: #{binary} not found" unless system("which #{binary} &>/dev/null")
+ Scide.fail :screen_not_found, "ERROR: #{binary} not found" unless Which.which(binary)
end
# Returns a representation of this configuration as a string.
def to_s
String.new.tap do |s|