lib/learn_open/opener.rb in learn-open-1.1.56 vs lib/learn_open/opener.rb in learn-open-1.1.57
- old
+ new
@@ -239,9 +239,20 @@
puts "Sorry, there seems to be a problem with this lesson. Please submit a bug report to bugs@learn.co and try again later."
puts "If you'd like to work on your next lesson now, type: learn next"
File.write(file_path, 'ERROR: Problem parsing lesson data. Try again.')
exit
end
+ rescue NoMethodError => e
+ if xcodeproj_file? || xcworkspace_file?
+ true
+ elsif e.message.match(/for false:FalseClass/)
+ false
+ else
+ puts "Sorry, there seems to be a problem with this lesson. Please submit a bug report to bugs@learn.co and try again later."
+ puts "If you'd like to work on your next lesson now, type: learn next"
+ File.write(file_path, 'ERROR: Problem parsing lesson data. Try again.')
+ exit
+ end
end
end
def open_ios_lesson
if can_open_ios_lesson?