bin/i2cssh in i2cssh-1.2.2 vs bin/i2cssh in i2cssh-1.2.3

- old
+ new

@@ -45,11 +45,18 @@ end opts.on '-c', '--cluster CLUSTERNAME', 'Name of the cluster specified in ~/.i2csshrc' do |c| require 'yaml' config_hash = YAML.load File.read File.expand_path '~/.i2csshrc' - servers += config_hash["clusters"][c] + cluster = config_hash["clusters"][c] + if cluster + servers += cluster + else + puts "ERROR: unknown cluster #{c}" + puts optparse.help + exit 1 + end end opts.on '-m', '--machines a,b,c', Array, 'Comma-separated list of hosts' do |h| servers += h end @@ -60,6 +67,6 @@ puts "ERROR: no servers given" puts optparse.help exit end -I2Cssh.new servers, ssh_options, i2_options \ No newline at end of file +I2Cssh.new servers, ssh_options, i2_options