lib/eco/cli/scripting/args_helpers.rb in eco-helpers-1.0.13 vs lib/eco/cli/scripting/args_helpers.rb in eco-helpers-1.0.14
- old
+ new
@@ -40,10 +40,10 @@
def get_file(key, required: false, should_exist: true)
filename = get_arg(key, with_param: true)
if !filename
if required
puts "you need to specify a file '#{key} file'"
- exit
+ exit(1)
end
elsif !(File.exists?(filename) || File.exists?(File.expand_path(filename)))
if should_exist && required
puts "file doesn't exist #{filename}"
exit