Skip to content

Commit dd4d4db

Browse files
committed
Add warning if wrappers are being overwritten
1 parent f88ab4f commit dd4d4db

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

easybuild/tools/toolchain/toolchain.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,13 @@ def prepare_rpath_wrappers(self, rpath_filter_dirs=None, rpath_include_dirs=None
10531053

10541054
# make *very* sure we don't wrap around ourselves and create a fork bomb...
10551055
if os.path.exists(cmd_wrapper) and os.path.exists(orig_cmd) and os.path.samefile(orig_cmd, cmd_wrapper):
1056-
raise EasyBuildError("Refusing the create a fork bomb, which(%s) == %s", cmd, orig_cmd)
1056+
raise EasyBuildError("Refusing to create a fork bomb, which(%s) == %s", cmd, orig_cmd)
1057+
1058+
# it may be the case that the wrapper already exists if the user provides a fixed location to store
1059+
# the RPATH wrappers, in this case the wrappers will be overwritten as they do not yet appear in the
1060+
# PATH (`which(cmd)` does not "see" them). Warn that they will be overwritten.
1061+
if os.path.exists(cmd_wrapper):
1062+
_log.warning(f"Overwriting existing RPATH wrapper {cmd_wrapper}")
10571063

10581064
# enable debug mode in wrapper script by specifying location for log file
10591065
if build_option('debug') and not disable_wrapper_log:

0 commit comments

Comments
 (0)