bin/gtk2passwordapp in gtk2passwordapp-4.0.1 vs bin/gtk2passwordapp in gtk2passwordapp-4.1.0
- old
+ new
@@ -2,11 +2,13 @@
require 'rafini'
using Rafini::Exception
using Rafini::Array
begin
- nogui, hlp, vrs = ARGV.any?('--no-gui'), ARGV.any?('-h', '--help'), ARGV.any?('-v', '--version')
+ nogui = ARGV.include?('--no-gui')
+ hlp = ['-h', '--help'].any?{|_|ARGV.include?(_)}
+ vrs = ['-v', '--version'].any?{|_|ARGV.include?(_)}
if nogui or hlp or vrs
# Going to proceed on need only basis, which may break some conventions...
# Get the version.
require 'gtk2passwordapp/version'
@@ -15,10 +17,10 @@
if vrs
puts version
exit
end
- vbs = ARGV.any?('-V', '--verbose')
+ vbs = ARGV.any?{|_|['-V', '--verbose'].include?(_)}
# Get the config.
require 'xdg'
require 'gtk2passwordapp/config'
config = mod::CONFIG