Escape the newline in the inspect query

This commit is contained in:
Donal McBreen
2023-09-12 19:10:39 +01:00
parent a367819a1c
commit fb0aeec27e
4 changed files with 5 additions and 5 deletions

View File

@@ -153,7 +153,7 @@ class Kamal::Commands::App < Kamal::Commands::Base
def cord(version:)
pipe \
docker(:inspect, "-f '{{ range .Mounts }}{{printf \"%s %s\n\" .Source .Destination}}{{ end }}'", container_name(version)),
docker(:inspect, "-f '{{ range .Mounts }}{{printf \"%s %s\\n\" .Source .Destination}}{{ end }}'", container_name(version)),
[:awk, "'$2 == \"#{role_config.cord_volume.container_path}\" {print $1}'"]
end