Skip malformed spec strings when searching for externals (#19438)
fixes #19266 fzf search method has also been updated Co-authored-by: Tom Scogland <tom.scogland@gmail.com>
This commit is contained in:

committed by
GitHub

parent
2bb775496e
commit
c696518efd
@@ -202,14 +202,19 @@ def determine_spec_details(cls, prefix, exes_in_prefix):
|
||||
external_modules = extra_attributes.pop(
|
||||
'modules', None
|
||||
)
|
||||
spec = spack.spec.Spec(
|
||||
spec_str,
|
||||
external_path=external_path,
|
||||
external_modules=external_modules
|
||||
)
|
||||
specs.append(spack.spec.Spec.from_detection(
|
||||
spec, extra_attributes=extra_attributes
|
||||
))
|
||||
try:
|
||||
spec = spack.spec.Spec(
|
||||
spec_str,
|
||||
external_path=external_path,
|
||||
external_modules=external_modules
|
||||
)
|
||||
except Exception as e:
|
||||
msg = 'Parsing failed [spec_str="{0}", error={1}]'
|
||||
tty.debug(msg.format(spec_str, str(e)))
|
||||
else:
|
||||
specs.append(spack.spec.Spec.from_detection(
|
||||
spec, extra_attributes=extra_attributes
|
||||
))
|
||||
|
||||
return sorted(specs)
|
||||
|
||||
|
Reference in New Issue
Block a user