bin/sup-config in sup-0.12.1 vs bin/sup-config in sup-0.13.0
- old
+ new
@@ -1,10 +1,9 @@
#!/usr/bin/env ruby
require 'rubygems'
require 'highline/import'
-require 'yaml'
require 'trollop'
require "sup"
$opts = Trollop::options do
version "sup-config (sup #{Redwood::VERSION})"
@@ -23,11 +22,11 @@
ans = if default && !default.empty?
ask "#{q} (enter for \"#{default}\"): "
else
ask "#{q}: "
end
- ans.empty? ? default : ans
+ ans.empty? ? default : ans.to_s
end
def axe_yes q, default="n"
axe(q, default) =~ /^y|yes$/i
end
@@ -101,11 +100,11 @@
puts "Ok, trying to run \"#{cmd}\"..."
system cmd
if $?.success?
say "Great! Added!"
- break
+ break
else
say "Rats, that failed. You may have to do it manually."
if axe_yes("Try again?") then next else return end
end
end
@@ -208,10 +207,10 @@
cmd = build_cmd("sup-sync") + " --all-sources"
puts "Ok, trying to run \"#{cmd}\"..."
system cmd
if $?.success?
say "Great! It worked!"
- break
+ break
else
say "Rats, that failed. You may have to do it manually."
if axe_yes("Try again?") then next else break end
end
end