From f00adea8fd7f34b9cfa876a60a2ce1b14a31d48e Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 9 Dec 2025 13:32:45 +0100 Subject: [PATCH] Show possible locations when specifying non-existant paths in github CLI integration --- easybuild/tools/github.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/easybuild/tools/github.py b/easybuild/tools/github.py index 2cb93f8d8c..9041464273 100644 --- a/easybuild/tools/github.py +++ b/easybuild/tools/github.py @@ -1073,10 +1073,11 @@ def _easyconfigs_pr_common(paths, ecs, start_branch=None, pr_branch=None, start_ ec_paths.append(path) if non_existing_paths: - raise EasyBuildError( - "One or more non-existing paths specified: %s", ', '.join(non_existing_paths), - exit_code=EasyBuildExit.OPTION_ERROR - ) + msg = "One or more non-existing paths specified: " + ', '.join(non_existing_paths) + found_ecs = {ec['spec'] for ec in ecs if os.path.basename(ec['spec']) in non_existing_paths} + if found_ecs: + msg += '\nDid you mean: ' + ', '.join(found_ecs) + raise EasyBuildError(msg, exit_code=EasyBuildExit.OPTION_ERROR) if not any(paths.values()): raise EasyBuildError("No paths specified", exit_code=EasyBuildExit.OPTION_ERROR)