Skip to content

Commit

Permalink
Correct version parsing for singularity-ce. (#326)
Browse files Browse the repository at this point in the history
Community edition of singularity starting version 3.8.0 (https://github.com/sylabs/singularity/releases?page=4) changes its name to `singularity-ce`. This commit adds support for version strings that looks like `singularity-ce version 3.10.0`.
  • Loading branch information
sergey-serebryakov authored Aug 2, 2023
1 parent 8d23a1f commit c400698
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ def init(self, force: bool = False) -> None:
Runtime.SINGULARITY,
version_string[20:].strip(),
)
elif version_string.startswith("singularity-ce version "):
runtime, version_string = (
Runtime.SINGULARITY,
version_string[23:].strip(),
)
elif version_string.startswith("apptainer version "):
runtime, version_string = Runtime.APPTAINER, version_string[18:].strip()
elif "/" in version_string: # Handle old stuff like "x.y.z-pull/123-0a5d"
Expand Down

0 comments on commit c400698

Please sign in to comment.