fix: path handling error when har2case har file and cwd != ProjectRootDir

This commit is contained in:
debugtalk
2020-06-19 15:05:58 +08:00
parent e3947c055a
commit 215295cdda
4 changed files with 25 additions and 17 deletions

View File

@@ -80,7 +80,8 @@ def __ensure_absolute(path: Text) -> Text:
absolute_path = os.path.join(project_meta.RootDir, path)
if not os.path.isfile(absolute_path):
raise exceptions.ParamsError(f"Invalid testcase file path: {absolute_path}")
logger.error(f"Invalid testcase file path: {absolute_path}")
sys.exit(1)
return absolute_path