The way bash starts up is designed, I think, to have one file where output and prompt setting is OK and one file where it isn't.
A run-time test would be done to distinguish interactivity, for example, checking to see if the prompt is set.