Skip to content

Commit 7d563d9

Browse files
authored
Merge pull request #4946 from bedroge/copy_exts_patch_fix
only copy patches for which a path is defined
2 parents ef9ee90 + 5c56ed3 commit 7d563d9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

easybuild/framework/easyblock.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5125,7 +5125,8 @@ def ensure_writable_log_dir(log_dir):
51255125
for ext in app.exts:
51265126
patches += ext.get('patches', [])
51275127
for patch in patches:
5128-
repo.add_patch(patch['path'], app.name)
5128+
if 'path' in patch:
5129+
repo.add_patch(patch['path'], app.name)
51295130
repo.commit("Built %s" % app.full_mod_name)
51305131
del repo
51315132
except EasyBuildError as err:
@@ -5151,9 +5152,10 @@ def ensure_writable_log_dir(log_dir):
51515152
for ext in app.exts:
51525153
patches += ext.get('patches', [])
51535154
for patch in patches:
5154-
target = os.path.join(new_log_dir, os.path.basename(patch['path']))
5155-
copy_file(patch['path'], target)
5156-
_log.debug("Copied patch %s to %s", patch['path'], target)
5155+
if 'path' in patch:
5156+
target = os.path.join(new_log_dir, os.path.basename(patch['path']))
5157+
copy_file(patch['path'], target)
5158+
_log.debug("Copied patch %s to %s", patch['path'], target)
51575159

51585160
if build_option('read_only_installdir') and not app.cfg['stop']:
51595161
# take away user write permissions (again)

0 commit comments

Comments
 (0)