fix timestomp arg parsing

bug/bundler_fix
rwhitcroft 2015-04-10 00:28:35 -04:00
parent 298b20ba74
commit b5f4b72b51
1 changed files with 11 additions and 2 deletions

View File

@ -52,12 +52,21 @@ class Console::CommandDispatcher::Priv::Timestomp
#
def cmd_timestomp(*args)
if (args.length < 2)
print_line("\nUsage: timestomp file_path OPTIONS\n" +
print_line("\nUsage: timestomp OPTIONS file_path\n" +
@@timestomp_opts.usage)
return
end
file_path = args.shift
file_path = nil
args.each { |a| file_path = a unless a[0] == "-" }
if file_path.nil?
print_line("\nNo filepath specified.")
return
end
args.delete(file_path)
modified = nil
accessed = nil
creation = nil