Skip to content

Commit

Permalink
chore: silence error from chdir when closing a workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
CNSeniorious000 committed Aug 8, 2024
1 parent 2cc1d5b commit 4e53a5b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/python/workspace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ def __init__(self, sources: dict[str, str]):
self.files = list(sources)

def close(self):
chdir(self._original_working_dir)
try:
chdir(self._original_working_dir)
except FileNotFoundError:
console.error(f"{self._original_working_dir} not found")
console.error(f"{Path.cwd()} is the current working directory")
self.directory.cleanup()
sys.path.remove(self.directory.name)

Expand Down

0 comments on commit 4e53a5b

Please sign in to comment.