From 02bda720c0f969e7267019613619af7d68114790 Mon Sep 17 00:00:00 2001 From: Gergely Tankovics Date: Mon, 30 Nov 2020 09:45:37 +0100 Subject: [PATCH] handling non json lines as raw with red color --- plugins/kubectl-plugins/kubectl-jq | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/kubectl-plugins/kubectl-jq b/plugins/kubectl-plugins/kubectl-jq index 5229a1d5..abbd3dda 100755 --- a/plugins/kubectl-plugins/kubectl-jq +++ b/plugins/kubectl-plugins/kubectl-jq @@ -1,3 +1,3 @@ #!/bin/bash -/usr/local/bin/kubectl logs -f $1 -n $2 --context $3 | jq -r '.message' \ No newline at end of file +/usr/local/bin/kubectl logs -f $1 -n $2 --context $3 | jq -rR '. as $raw | try (fromjson | .message) catch ("\u001b[31m" + $raw + "\u001b[0m")' \ No newline at end of file