exe/rbnotes in rbnotes-0.4.2 vs exe/rbnotes in rbnotes-0.4.3

- old
+ new

@@ -21,10 +21,18 @@ file = args.shift raise ArgumentError, args.unshift(arg) if file.nil? file = File.expand_path(file) raise ArgumentError, "no such file: %s" % file unless FileTest.exist?(file) @gopts[:conf_file] = file + when "-v", "--version" + args.clear + args.unshift("version") + break + when "-h", "--help" + args.clear + args.unshift("help") + break else args.unshift(arg) break end end @@ -41,9 +49,10 @@ app.parse_global_options(ARGV) app.run(ARGV) rescue MissingArgumentError, MissingTimestampError, NoEditorError, ProgramAbortError, Textrepo::InvalidTimestampStringError, - ArgumentError => e + ArgumentError, + Errno::EACCES => e puts e.message exit 1 end