From a43ac2aea2b59c5560aab914d8cc50586eaa36b8 Mon Sep 17 00:00:00 2001 From: James Conroy Date: Sat, 12 Feb 2022 12:22:59 -0600 Subject: [PATCH] Move the jinja endraw directive below is_tty This will prevent jninja from interpreting the shell string length expansion as the start of jninja comments --- salt/common/tools/sbin/so-status | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/common/tools/sbin/so-status b/salt/common/tools/sbin/so-status index a8032a849..ef3f98176 100755 --- a/salt/common/tools/sbin/so-status +++ b/salt/common/tools/sbin/so-status @@ -285,8 +285,6 @@ main() { fi } -# {% endraw %} - is_tty() { __tty=0 [ -t 1 ] && __tty=1 @@ -294,6 +292,8 @@ is_tty() { [ "${#NO_COLOR}" -ne 0 ] && __tty=0 } +# {% endraw %} + if ! [ "$(id -u)" = 0 ]; then echo "${0}: This command must be run as root" exit 1