Message ID | 20170520082005.11668-1-yann.morin.1998@free.fr |
---|---|
State | Accepted |
Headers | show |
Hello, On Sat, 20 May 2017 10:20:05 +0200, Yann E. MORIN wrote: > + # Break the '\n' sequence, or a \n is printed (which is not what we want). > + printf "Your PATH contains a newline (%sn) charater.\n" "\\" Typo: character. > + printf "This doesn't work. Fix you PATH.\n" > + exit 1 > + ;; Also, we use one tab for indentation in this file, not 4 spaces, so I've fixed that. Applied to master. Thanks! Thomas
diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh index 168d1960a1..925414cf18 100755 --- a/support/dependencies/dependencies.sh +++ b/support/dependencies/dependencies.sh @@ -29,6 +29,18 @@ if test -n "$LD_LIBRARY_PATH" ; then fi fi; +# PATH should not contain a newline, otherwise it fails in spectacular ways +# as soon as PATH is referenced in a package rule +case "${PATH}" 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) charater.\n" "\\" + printf "This doesn't work. Fix you PATH.\n" + exit 1 + ;; +esac + # sanity check for CWD in PATH. Having the current working directory # in the PATH makes the toolchain build process break. # try not to rely on egrep..