lib/nilac/parse_arguments.rb in nilac-0.0.4.3.9.7.1 vs lib/nilac/parse_arguments.rb in nilac-0.0.4.3.9.8

- old
+ new

@@ -7,19 +7,15 @@ %w{r run} => "run", %w{h help} => "help", %w{v version} => "version", - - %w{b build} => "build", - + %w{u update} => "update", - %w{re release} => "release", - } - + output_hash = {} argument_map.each do |key,val| if input_argv.include?("-#{key[0]}") or input_argv.include?("--#{key[1]}") @@ -31,10 +27,28 @@ else output_hash[val.to_sym] = nil end - + + end + + if output_hash.values.compact.empty? and !input_argv.empty? + + if input_argv[0].include?(".nila") + + output_hash[:run] = [input_argv[0]] + + elsif File.directory?(input_argv[0]) + + puts "\nSorry! Nilac cannot compile and run folders full of source files at this time.\n\n" + + puts "Check out the documentation at https://adhithyan15.github.io/nila#cli-options\nif you have any questions\n\n" + + exit + + end + end return output_hash end \ No newline at end of file