Skip to content

Commit

Permalink
fix: dont fall through when it is gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollorion committed Aug 6, 2024
1 parent d6f0416 commit 0d870aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spacemk/exporters/terraform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ def _map_modules_data(self, src_data: dict) -> dict:
segments = module.get("attributes.vcs-repo.identifier").split("/")
vcs_namespace = "/".join(segments[:-1])
vcs_repository = segments[-1]
elif module.get("attributes.vcs-repo.identifier"):
elif not self.is_gitlab and module.get("attributes.vcs-repo.identifier"):
segments = module.get("attributes.vcs-repo.identifier").split("/")
vcs_namespace = segments[0]
vcs_repository = segments[1]
Expand Down Expand Up @@ -1289,7 +1289,7 @@ def find_workspace_variable_with_invalid_name(data: dict, workspace_id: str, typ
segments = workspace.get("attributes.vcs-repo.identifier").split("/")
vcs_namespace = "/".join(segments[:-1])
vcs_repository = segments[-1]
elif workspace.get("attributes.vcs-repo.identifier"):
elif provider != "gitlab" and workspace.get("attributes.vcs-repo.identifier"):
segments = workspace.get("attributes.vcs-repo.identifier").split("/")
vcs_namespace = segments[0]
vcs_repository = segments[1]
Expand Down

0 comments on commit 0d870aa

Please sign in to comment.