Indeed. Ukraine testing a nuke would be one way to stop all support from the West quite literally overnight. Would go against the almost religious policy of the West of nuclear proliferation which Western allies don't get a pass on that either.They would lose every ounce of support from the west if they did that. Now when the war is over….
Also for these reasons if Japan ever created or tested a nuke. They better get ready for serious diplomatic and economic blowback even from their allies in the West. The West will punish allies for developing nuclear weapons if not just so they don't look hypocritical.
