watson-ruby icon indicating copy to clipboard operation
watson-ruby copied to clipboard

Not sure this is the correct place to put the Ctrl+C capture [lib/watson/command.rb]

Open nhmood opened this issue 11 years ago • 0 comments

filename : lib/watson/command.rb line # : 60 tag : review md5 : 9b282879834ad99eba631c996578d8d0

        # [review] - Not sure this is the correct place to put the Ctrl+C capture
        trap("INT") do
            File.delete(@config.tmp_file) if File.exists?(@config.tmp_file)
            exit 2
        end
            # Parse command line options
        # Begin by slicing off until we reach a valid flag

        # Always look at first array element in case and then slice off what we need
        # Accept parameters to be added / overwritten if called twice
        # Slice out from argument until next argument

        # Clean up argument list by removing elements until the first valid flag    
        until _flag_list.include?(args[0]) || args.length == 0
            # [review] - Make this non-debug print to user?
            debug_print "Unrecognized flag #{ args[0] }\n"

nhmood avatar Nov 21 '13 16:11 nhmood