perl: Fix binary detection (#14536)

It seems that stable versions of perl also install a `perlX.Y.Z` binary.
However, it seems that this binary can hang if used in conjunction with
Spack's sbang workaround, as observed during automake's build.
This commit is contained in:
Michael Kuhn 2020-01-16 17:11:54 +01:00 committed by Adam J. Stewart
parent b7f0493563
commit 8ad0be96aa

View File

@ -305,7 +305,7 @@ def command(self):
Returns: Returns:
Executable: the Perl command Executable: the Perl command
""" """
for ver in (self.spec.version, ''): for ver in ('', self.spec.version):
path = os.path.join(self.prefix.bin, '{0}{1}'.format( path = os.path.join(self.prefix.bin, '{0}{1}'.format(
self.spec.name, ver)) self.spec.name, ver))
if os.path.exists(path): if os.path.exists(path):