Do not construct path to perl command manually (#6927)

Instead, use spec['perl'].command.path.
This commit is contained in:
Michael Kuhn
2018-01-14 05:10:42 +01:00
committed by Adam J. Stewart
parent 589ea856a5
commit df7876ab54
5 changed files with 8 additions and 10 deletions

View File

@@ -55,12 +55,11 @@ def filter_sbang(self):
# We have to do this after install because otherwise the install
# target will try to rebuild the binaries (filter_file updates the
# timestamps)
perl = join_path(self.spec['perl'].prefix.bin, 'perl')
# Revert sbang, so Spack's sbang hook can fix it up
filter_file('^#! /usr/bin/env perl',
'#! {0} -w'.format(perl),
'{0}/autom4te'.format(self.prefix.bin),
'#! {0} -w'.format(self.spec['perl'].command.path),
self.prefix.bin.autom4te,
backup=False)
def _make_executable(self, name):