support/dependencies/dependencies.sh: simplify an error message
authorMarkus Mayer <mmayer@broadcom.com>
Tue, 9 Apr 2019 22:05:15 +0000 (15:05 -0700)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 10 Apr 2019 05:45:30 +0000 (07:45 +0200)
There is no need to break the "\n" sequence using "%sn". We can just
escape it. Note: the escaping backslash needs to be escaped too,
because the shell will process the string before printf gets to see it.

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
support/dependencies/dependencies.sh

index 826874baa2e8ae3f7908282ad86e32dbe046526c..1d5c164aa65b8c9ec0f0be33ced6f4ae232cc367 100755 (executable)
@@ -37,8 +37,7 @@ case ":${PATH:-unset}:" in
        ;;
 (*"
 "*)    printf "\n"
-       # Break the '\n' sequence, or a \n is printed (which is not what we want).
-       printf "Your PATH contains a newline (%sn) character.\n" "\\"
+       printf "Your PATH contains a newline (\\\n) character.\n"
        printf "This doesn't work. Fix you PATH.\n"
        exit 1
        ;;