diff options
author | 2024-05-17 12:04:16 +0200 | |
---|---|---|
committer | 2024-06-06 12:38:50 +0000 | |
commit | 7842c78a5321c1ed4341ae6669d8081db8d72fdb (patch) | |
tree | d3a028cd939026fb11efb1d33668e9481ef7196f /packages | |
parent | cd53cb57724f23aa3eab000f9e3ad936c8a6a173 (diff) |
flag_check: use project name instead of project path to determine the project
This avoids mistakenly misidentifying projects when they are not
checked out to the standard worktree.
Fixes: 340801952
Test: repo upload
Flag: NONE
Change-Id: I69835db39c48ef84e2c0a9bee1e4246aef3c22e3
Merged-In: I69835db39c48ef84e2c0a9bee1e4246aef3c22e3
Diffstat (limited to 'packages')
-rwxr-xr-x | packages/SystemUI/flag_check.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/SystemUI/flag_check.py b/packages/SystemUI/flag_check.py index bac3553e7498..a492864b11df 100755 --- a/packages/SystemUI/flag_check.py +++ b/packages/SystemUI/flag_check.py @@ -51,7 +51,7 @@ def main(): nargs='?', default='', help= - 'REPO_PATH in repo upload to determine whether the check should run for this project.') + 'REPO_PROJECT in repo upload to determine whether the check should run for this project.') # Parse the arguments args = parser.parse_args() @@ -108,16 +108,16 @@ def main(): sys.exit(0) -def should_run_path(path, files): +def should_run_path(project, files): """Returns a boolean if this check should run with these paths. If you want to check for a particular subdirectory under the path, add a check here, call should_run_files and check for a specific sub dir path in should_run_files. """ - if not path: + if not project: return False - if path == 'frameworks/base': + if project == 'platform/frameworks/base': return should_run_files(files) - # Default case, run for all other paths which calls this script. + # Default case, run for all other projects which calls this script. return True |