тунеядца, враг народа
If you get to the stage of certainty, the dynamic would probably change.
But I do like you answer.
Well, depends on the type of disaster. Hollywood logic says they'd announce it in the hopes of a merry band of misfits, led by a rogueish leading man with stubble and a tragic backstory, whose first response to anyone asking him to help is "I'm retired," coming together in a last-ditch suicide mission to save the world and win back the love interest in the process.
In the real world, it might also be worth considering if they'd be allowed to tell (no idea if other gov't agencies have veto power over NASA announcements or not). Based on historical instances of near-doomsday scenarios, my guess is they'd let people know. I mean, the Cuban Missile Crisis would've merited discretion due to the diplomatic delicacy of the situation, way more than a near-certain impending astronomical disaster would deserve a cover-up, and they didn't hide that. Then again, the comparison isn't 1:1 since there's more to be done in response to nuclear threat that could minimize fallout damage (and I have no idea what the situation was as far as worst-case projections and second strike capability and all that shit at the time). Also because it isn't the '60s any more.
Also, do you think it'd impact their decision at all if NASA could be facing blame/legitimate scrutiny for it somehow?