mandy 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/mandy.rb +4 -1
- metadata +1 -1
data/lib/mandy.rb
CHANGED
@@ -57,7 +57,10 @@ at_exit do
|
|
57
57
|
input = Mandy.local_input || ENV['MANDY_INPUT']
|
58
58
|
unless input
|
59
59
|
print "Input file: "
|
60
|
-
input = gets.chomp
|
60
|
+
input = (gets || '').chomp
|
61
|
+
end
|
62
|
+
if input.nil? or input.size==0 or !File.exists?(input)
|
63
|
+
raise "Input file #{input.nil? or input.size==0 ? 'was not provided' : "'#{input}' does not exist"}! Try specifying 'Mandy.local_input=' or if Mandy has launched by mistake then set 'Mandy.autorun = false' to avoid this check."
|
61
64
|
end
|
62
65
|
file = caller
|
63
66
|
output_folder = FileUtils.mkdir_p("/tmp/mandy-local")
|