aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>2021-10-06 09:22:15 -0400
committerGitHub <noreply@github.com>2021-10-06 09:22:15 -0400
commit8415cedf08bf725f4b35b63b747f70fdf677ac51 (patch)
tree1609a1305dd092894e4cf3aae8e7e477d3624086
parentc63ca4b8cd66eefa342e7dfbde3e453be58f8c99 (diff)
downloadoss-fuzz-8415cedf08bf725f4b35b63b747f70fdf677ac51.tar.gz
[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-xinfra/helper.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/infra/helper.py b/infra/helper.py
index db9f76b6a..805f39a99 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):