Skip to content

Commit b330d8b

Browse files
author
Andrei Neagu
committed
only apply to VCS
1 parent 35c2d25 commit b330d8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/service-integration/src/service_integration/cli/_compose_spec.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def _strip_credentials(url: str) -> str:
4545

4646
def _run_git_or_empty_string(*args) -> str:
4747
try:
48-
return _strip_credentials(_run_git(*args))
48+
return _run_git(*args)
4949
except FileNotFoundError as err:
5050
error_console.print(
5151
"WARNING: Defaulting label to emtpy string",
@@ -127,8 +127,8 @@ def create_docker_compose_image_spec(
127127
extra_labels[f"{LS_LABEL_PREFIX}.vcs-ref"] = _run_git_or_empty_string(
128128
"rev-parse", "HEAD"
129129
)
130-
extra_labels[f"{LS_LABEL_PREFIX}.vcs-url"] = _run_git_or_empty_string(
131-
"config", "--get", "remote.origin.url"
130+
extra_labels[f"{LS_LABEL_PREFIX}.vcs-url"] = _strip_credentials(
131+
_run_git_or_empty_string("config", "--get", "remote.origin.url")
132132
)
133133

134134
return create_image_spec(

0 commit comments

Comments
 (0)