diff options
author | jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com> | 2021-10-06 09:22:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-06 09:22:15 -0400 |
commit | 8415cedf08bf725f4b35b63b747f70fdf677ac51 (patch) | |
tree | 1609a1305dd092894e4cf3aae8e7e477d3624086 | |
parent | c63ca4b8cd66eefa342e7dfbde3e453be58f8c99 (diff) |
[cifuzz][helper] Fix error message for nonexistent external project (#6558)
Say path doesn't exist instead of the last directory in path.
Fixes: https://github.com/google/oss-fuzz/issues/6528
-rwxr-xr-x | infra/helper.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/infra/helper.py b/infra/helper.py index db9f76b6..805f39a9 100755 --- a/infra/helper.py +++ b/infra/helper.py @@ -372,11 +372,16 @@ def is_base_image(image_name): def check_project_exists(project): """Checks if a project exists.""" - if not os.path.exists(project.path): - logging.error('%s does not exist.', project.name) - return False + if os.path.exists(project.path): + return True - return True + if project.is_external: + descriptive_project_name = project.path + else: + descriptive_project_name = project.name + + logging.error('"%s" does not exist.', descriptive_project_name) + return False def _check_fuzzer_exists(project, fuzzer_name): |