Fix interpolation

This commit is contained in:
David Heinemeier Hansson
2023-01-30 13:59:44 +01:00
parent cd8570d776
commit 3ebf8d7777
3 changed files with 3 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ class Mrsk::Commands::Accessory < Mrsk::Commands::Base
def follow_logs(grep: nil) def follow_logs(grep: nil)
run_over_ssh pipe( run_over_ssh pipe(
docker(:logs, service_name, "-t", "-n", "10", "-f", "2>&1"), docker(:logs, service_name, "-t", "-n", "10", "-f", "2>&1"),
("grep '#{grep}'" if grep) (%(grep "#{grep}") if grep)
).join(" "), host: host ).join(" "), host: host
end end

View File

@@ -67,7 +67,7 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
run_over_ssh pipe( run_over_ssh pipe(
current_container_id, current_container_id,
"xargs docker logs -t -n 10 -f 2>&1", "xargs docker logs -t -n 10 -f 2>&1",
("grep '#{grep}'" if grep) (%(grep "#{grep}") if grep)
).join(" "), host: host ).join(" "), host: host
end end

View File

@@ -33,7 +33,7 @@ class Mrsk::Commands::Traefik < Mrsk::Commands::Base
def follow_logs(host:, grep: nil) def follow_logs(host:, grep: nil)
run_over_ssh pipe( run_over_ssh pipe(
docker(:logs, "traefik", "-t", "-n", "10", "-f", "2>&1"), docker(:logs, "traefik", "-t", "-n", "10", "-f", "2>&1"),
("grep '#{grep}'" if grep) (%(grep "#{grep}") if grep)
).join(" "), host: host ).join(" "), host: host
end end