Skip to content

Commit 6d84ad2

Browse files
committed
fix: correct syntax in binary.yaml for tool download loop
- Adjusted the syntax in the binary download task to ensure proper list initialization. This change enhances the clarity of the loop structure and maintains functionality. Signed-off-by: redscholar <blacktiledhouse@gmail.com>
1 parent ccddbb1 commit 6d84ad2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

builtin/core/roles/download/package/tasks/binary.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,14 @@
271271

272272
- name: Binary | Download tools to binary directory
273273
loop: >
274-
{- $result := list -}}
274+
{{- $result := list -}}
275275
{{- range $arch := .download.arch }}
276276
{{- range $tool,$url := $.download.tools }}
277277
{{- $result = append $result (dict "arch" $arch "tool" $tool "url" $url) -}}
278278
{{- end }}
279279
{{- end }}
280280
{{- $result | toJson }}
281-
when: printf "%s/tools/%s/%s" .artifact_dir .item.arch (base .item.url) | fileExists | not
281+
when: printf "%s/tools/%s/%s" .artifact_dir .item.arch (base (tpl .item.url .item)) | fileExists | not
282282
copy:
283-
src: "{{ .binary_dir }}/tools/{{ .item.arch }}/{{ base .item.url }}"
284-
dest: "{{ .artifact_dir }}/tools/{{ .item.arch }}/{{ base .item.url }}"
283+
src: "{{ .binary_dir }}/tools/{{ .item.arch }}/{{ base (tpl .item.url .item) }}"
284+
dest: "{{ .artifact_dir }}/tools/{{ .item.arch }}/{{ base (tpl .item.url .item) }}"

0 commit comments

Comments
 (0)