Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions lmod_manager/lmod_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,18 @@ def _installation_file() -> Path:
return Path("bin/rustc")

def _install_archive(self, installation_dir: Path) -> None:
call(
f"./install --install-dir='{installation_dir}' --force",
Comment thread
treiher marked this conversation as resolved.
cwd=self._extracted_archive_dir(),
shell=True,
)
if (self._extracted_archive_dir() / "doinstall").is_file():
call(
f"./doinstall '{installation_dir}'",
cwd=self._extracted_archive_dir(),
shell=True,
)
else:
call(
f"./install --install-dir='{installation_dir}' --force",
cwd=self._extracted_archive_dir(),
shell=True,
)


def main() -> Union[int, str]:
Expand Down
Binary file not shown.
7 changes: 7 additions & 0 deletions tests/lmod_manager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,13 @@ def test_install_unexpected_archive_name_format(monkeypatch: MonkeyPatch, tmp_pa
"25.0w-20240820",
),
],
[
Archive(
"gnatpro-rust-26.2-x86_64-linux-bin.tar.gz",
"gnatpro-rust",
"26.2",
),
],
],
)
def test_install_and_uninstall(
Expand Down
Loading