lib/learn_submit/submission.rb in learn-submit-1.1.2 vs lib/learn_submit/submission.rb in learn-submit-1.1.3
- old
+ new
@@ -64,11 +64,11 @@
puts "It seems like there's a problem connecting to Learn. Trying again..."
submit!(retries-1)
else
puts "Sorry, there's a problem reaching Learn right now. Please try again."
File.write(file_path, 'ERROR: Error connecting to learn.')
- exit
+ exit 1
end
end
case pr_response.status
when 200
@@ -76,20 +76,20 @@
File.write(file_path, 'Done.')
exit
when 404
puts 'Sorry, it seems like there was a problem connecting with Learn. Please try again.'
File.write(file_path, 'ERROR: Error connecting to learn.')
- exit
+ exit 1
else
puts pr_response.message
if pr_response.message.match(/looks the same/)
File.write(file_path, 'ERROR: Nothing to submit')
else
File.write(file_path, 'Done.')
end
- exit
+ exit 1
end
end
end
end