Skip to content

Commit c2ad2f6

Browse files
authored
add missing newlines each line of the env activation scripts (#109)
Fixes #108
1 parent b4741e0 commit c2ad2f6

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Diff for: stackinator/etc/add-compiler-links.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,21 @@ def has_prefix(path, prefix):
8787
# parse PATH to remove references to the build directory
8888
if export["variable"] == "PATH":
8989
paths=[p for p in export["paths"] if not has_prefix(p, args.build_path)]
90-
lines.append(f"export PATH={':'.join(paths)};")
90+
lines.append(f"export PATH={':'.join(paths)};\n")
9191

9292
# drop the SPACK_ENV variable
9393
elif export["variable"] == "SPACK_ENV":
9494
pass
9595

9696
else:
97-
lines.append(line.strip())
97+
lines.append(line.strip()+"\n")
9898
else:
99-
lines.append(line.strip())
99+
lines.append(line.strip()+"\n")
100100

101101
# Prepend the compiler paths to PATH
102-
lines.append("# compiler paths added by stackinator")
103-
lines.append(f"export PATH={pathstring}:$PATH;")
102+
lines.append("# compiler paths added by stackinator\n")
103+
lines.append(f"export PATH={pathstring}:$PATH;\n")
104104

105105
# Write a modified version of the activation script.
106106
with open(args.activate_path, 'w') as fid:
107107
fid.writelines(lines)
108-

0 commit comments

Comments
 (0)