Necessity can make a doubtful action innocent, but it cannot make it commendable.
[La nécessité peut rendre innocente une action douteuse ; mais elle ne saurait la rendre louable.]
Joseph Joubert (1754-1824) French moralist, philosopher, essayist, poet
Pensées [Thoughts], ch. 9 “De la Sagesse, de la Vertu, etc. [On Wisdom and Virtue],” ¶ 20 (1850 ed.) [tr. Auster (1983), 1808]
(Source)
(Source (French)). Alternate translations:Necessity may render a doubtful act innocent, but it cannot make it praiseworthy.
[tr. Attwell (1896), ¶ 133]Necessity may render a doubtful action innocent; but it cannot make it praiseworthy.
[tr. Lyttelton (1899), ch. 8, ¶ 16]