chore: cleaner exception tracebacks
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
committed by
Henry Schreiner
parent
929ecac7f8
commit
534cada6a5
@@ -367,7 +367,8 @@ def build(options: Options, tmp_path: Path) -> None: # pylint: disable=unused-a
|
||||
cwd = Path.cwd()
|
||||
abs_package_dir = options.globals.package_dir.resolve()
|
||||
if cwd != abs_package_dir and cwd not in abs_package_dir.parents:
|
||||
raise Exception("package_dir must be inside the working directory")
|
||||
msg = "package_dir must be inside the working directory"
|
||||
raise Exception(msg)
|
||||
|
||||
container_project_path = PurePosixPath("/project")
|
||||
container_package_dir = container_project_path / abs_package_dir.relative_to(cwd)
|
||||
|
||||
Reference in New Issue
Block a user