On Fri, Aug 26, 2022 at 08:17:10AM +0100, Tim Woodall wrote:
$ cat Makefile.test
SHELL := /bin/bash -u
MAKEFLAGS += --no-builtin-rules
.SUFFIXES:
all:
echo done
$ make -f Makefile.test
echo done
done
$ make -f Makefile.test | cat
echo done
/etc/bash.bashrc: line 7: PS1: unbound variable
^^^^^^^^^^^
[...]
Why do I get that unbound variable error? (I know how to fix it, I just
don't understand why it only happens when I pipe the output)
If I were you, I'd go looking at your /etc/bashrc and see what's around
line 7. Mine says (line numbers added by me):