lib/hexlet/teacher_cli.rb in hexlet-0.2.0 vs lib/hexlet/teacher_cli.rb in hexlet-0.2.1
- old
+ new
@@ -10,10 +10,11 @@
puts (t "lesson_folder_created", folder: folder)
end
desc "submit PATH_TO_LESSON", "submit lesson"
def submit(path)
- lesson_folder = File.split(path)[1]
+ expanded_path = File.expand_path(path)
+ lesson_folder = File.split(expanded_path)[1]
parts = lesson_folder.split("_")
if parts.last != "lesson"
puts (t "wrong_lesson_folder")
return false