Permalink
Browse files

Check for host=auto after the settings are parsed

  • Loading branch information...
1 parent 54f9091 commit 3085a943a68a91f56752721f353db340b72b2e08 @timothyandrew timothyandrew committed with sorbits Aug 13, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 rmate
View
10 rmate
@@ -8,7 +8,7 @@ require 'optparse'
require 'socket'
require 'fileutils'
-VERSION_STRING = 'rmate version 1.3 (2011-10-18)'
+VERSION_STRING = 'rmate version 1.4 (2012-08-14)'
class Settings
attr_accessor :host, :port, :wait, :force, :verbose
@@ -19,16 +19,16 @@ class Settings
@host = ENV['RMATE_HOST'].to_s if ENV.has_key? 'RMATE_HOST'
@port = ENV['RMATE_PORT'].to_i if ENV.has_key? 'RMATE_PORT'
- if @host == 'auto' and (conn = ENV['SSH_CONNECTION'])
- @host = conn.split(' ').first
- end
-
@wait = false
@force = false
@verbose = false
read_disk_settings
parse_cli_options
+
+ if @host == 'auto' and (conn = ENV['SSH_CONNECTION'])
+ @host = conn.split(' ').first
+ end
end
def read_disk_settings

0 comments on commit 3085a94

Please sign in to comment.