Skip to content

Commit ef58a2c

Browse files
committed
LPD-79181 formats the template with a heredoc to make it more readable, no functional changes
1 parent ea688f2 commit ef58a2c

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

scripts/cli/lec.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,20 @@ _getServicePorts() {
425425
local projectDir="${1}"
426426
local serviceName="${2}"
427427
# shellcheck disable=SC2016
428-
local template='table NAME\tCONTAINER PORT\tHOST PORT\tWEB LINK\n{{$name := .Name}}{{range .Publishers}}{{if eq .URL "0.0.0.0"}}{{$name}}\t{{.TargetPort}}\t{{.PublishedPort}}\t{{if eq .PublishedPort 443}}https://localhost:{{.PublishedPort}}{{else}}http://localhost:{{.PublishedPort}}{{end}}\n{{end}}{{end}}'
428+
local template
429+
430+
read -r -d '' template <<- 'EOF'
431+
table NAME CONTAINER PORT HOST PORT WEB LINK
432+
{{$name := .Name -}}
433+
434+
{{range .Publishers -}}
435+
436+
{{if eq .URL "0.0.0.0" -}}
437+
{{$name}} {{.TargetPort}} {{.PublishedPort}} {{if eq .PublishedPort 443}}https{{else}}http{{end}}://localhost:{{.PublishedPort}}
438+
{{end -}}
439+
440+
{{end -}}
441+
EOF
429442

430443
(
431444
cd "${projectDir}" || exit 1

0 commit comments

Comments
 (0)