Output one mount per line

The go template was concatenating all the mounts into one line. It
happened to work because the mount we are interested was always first.

Fix it to output one mount per line instead.
This commit is contained in:
Donal McBreen
2023-09-07 15:20:50 +01:00
parent aa9999809c
commit cd02510d0f
4 changed files with 4 additions and 4 deletions

View File

@@ -332,7 +332,7 @@ class CommandsAppTest < ActiveSupport::TestCase
end
test "cord" do
assert_equal "docker inspect -f '{{ range .Mounts }}{{ .Source }} {{ .Destination }} {{ end }}' app-web-123 | awk '$2 == \"/tmp/kamal-cord\" {print $1}'", new_command.cord(version: 123).join(" ")
assert_equal "docker inspect -f '{{ range .Mounts }}{{printf \"%s %s\n\" .Source .Destination}}{{ end }}' app-web-123 | awk '$2 == \"/tmp/kamal-cord\" {print $1}'", new_command.cord(version: 123).join(" ")
end
test "tie cord" do