This repository was archived by the owner on Aug 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 66from src .exercises import current_working_exercises
77from src .exercises .seeker import ExerciseSeeker
88from src .utils .version_manager import VersionManager
9- from src .config import root_directory , dev_mode
9+ from src .config import root_directory , current_working_directory , dev_mode
1010from src .solutions .repository import get_solution
1111
1212version_manager = VersionManager ()
@@ -29,15 +29,15 @@ def capture_solution_request(solution_path: str):
2929
3030
3131def capture_single_exercise_check (exercise_path : Path ):
32- exercise_relative_path = exercise_path .relative_to (root_directory )
32+ exercise_relative_path = exercise_path .relative_to (current_working_directory )
3333 with sentry_sdk .push_scope () as scope :
3434 scope .set_tag ("exercise_to_check" , str (exercise_relative_path ))
3535 sentry_sdk .capture_message ("Single exercise check" , level = "info" )
3636
3737
3838async def cli (args ):
3939 exercise_seeker = ExerciseSeeker (current_working_exercises )
40- runner = Runner (root_directory , exercise_seeker )
40+ runner = Runner (exercise_seeker )
4141
4242 if args .version :
4343 version_manager .print_current_version ()
Original file line number Diff line number Diff line change 1111from src .file_watcher .watcher import FileWatcher
1212from src import prompt
1313from src .exercises .seeker import ExerciseSeeker
14+ from src .config import current_working_directory
1415
1516check_exercise_lock = Lock ()
1617
@@ -37,8 +38,8 @@ def capture_exercise_solved(exercise_path: str):
3738
3839
3940class Runner :
40- def __init__ (self , root_path : Path , exercise_seeker : ExerciseSeeker ):
41- self ._file_watcher = FileWatcher (root_path )
41+ def __init__ (self , exercise_seeker : ExerciseSeeker ):
42+ self ._file_watcher = FileWatcher (current_working_directory )
4243 self ._exercise_seeker = exercise_seeker
4344
4445 def on_file_changed (self , _ ):
Original file line number Diff line number Diff line change 44from pathlib import Path
55from rich .traceback import install
66from src import cli
7- from src .config import root_directory
7+ from src .config import current_working_directory
88
99install (show_locals = True )
1010
1111
1212def is_valid_file (parser , arg ):
1313 file_path = Path (arg ).resolve ()
1414 if not file_path .exists ():
15- file_path = root_directory / arg
15+ file_path = current_working_directory / arg
1616 if not file_path .exists ():
1717 return parser .error (f"The file { arg } does not exist!" )
1818 return file_path
You can’t perform that action at this time.
0 commit comments