On Fri, Aug 26, 2022 at 02:40:55PM +0100, Tim Woodall wrote: > But that's backwards, make is starting an interactive shell when its > output is redirected. When I don't redirect make's output it works.
I thought you were piping in the original message. There is a difference between a pipe, and a redirection. You might want to test both, and see exactly which one(s) trigger this behavior. It's still not clear to me whether it's make(1) passing the -i option for some reason, or bash incorrectly deciding that it should read these startup files, based on whatever criteria it uses to sense whether it's being run as an interactive shell. There are also various hacks that are compiled into Debian's version of bash, for example the one that reads the interactive startup files if bash believes it's the child of an sshd daemon. This is not the default behavior of upstream bash, but most Linux distributions enable this behavior because they believe, rightly or wrongly, that their users bases expect it. At this moment, I'm kind of leaning toward one of those hacks being triggered by your specific combination of factors.