If he pulled the knife out and kept getting closer then I would warn him and if he still kept coming then I'd draw, but if he wasn't reaching for the knife or anything I see no reason for him to know. Kind of just sounds like he tried to scare the guy away in fear of getting into a fight perhaps.
I think the smart thing would to have been to stay in the car and wait for the police to arrive to avoid all issues.
then youd already be dead b4 you could draw, find your target , and fire.
you see a knife in the hand of an aggressive person, back up, shoot, then call the police