Gofast, it is actually a good idea, in some places. In NC for instance it would be a good idea. I'm not familiar with the laws in MN, but I doubt you would be in trouble for using pepper spray instead of a gun.
It is probably good legal juju to say, "I thought he was a threat, but I didn't think things had escelated to the need for deadly force. So, I used my pepper spray because it seemed like the proper amount of force to stop the threat."
In NC there is a continuim of force that CCH classes are supposed to teach. That continuim goes like this, physical presence, words, soft hands, hard hands, chemical (such as mace or pepper spray), clubbing weapon, lethal force. So, it is actually easier to justify use of pepper spray than a gun or knife. Technically you should use pepper spray before hitting them with a "tactical" flashlight.
In NC if he didn't have a weapon you would have to explain why you didn't retreat. Then it would have to escelate past simple assault. It would have to be "imminent threat of serious bodily injury or death." So, you would be well served by having pepper spray in case things are in the gray area.
Just my opinion based on where I live. Things may be completely differnt in MN.