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
This commit is contained in:
James Conroy
2022-02-12 12:22:59 -06:00
parent 95b4f7b4ef
commit a43ac2aea2

View File

@@ -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