On the recommendation for someone who has sworn an oath and then sees something better than it to do what he swore he swore he would not do and expiate the oath

Riyad as-Salihin (The Meadows of the Righteous)

by Imam Nawawi

316. Chapter: On the recommendation for someone who has sworn an oath and then sees something better than it to do what he swore he swore he would not do and expiate the oath

1715. 'Abdu'r-Rahman ibn Samura said, "The Messenger of Allah, may Allah bless him and grant him peace, told me, 'When you swear an oath [to do something] and you think that something else is better than it, then do the thing which is better and expiate your oath.'" [Agreed upon]

1716. Abu Hurayra reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "Anyone who swears an oath and then sees something better than it, should expiate his oath and do the thing which is better." [Muslim]

1717. Abu Musa reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "By Allah, if Allah wills, I will never make an oath and then see something better than it without doing expiation for my oath and doing the thing that is better." [Agreed upon]

1718. Abu Hurayra reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "That one of you should persist in his oath in respect of his family is more sinful for you in the sight of Allah Almighty than him performing the expiation which Allah has prescribed for it." [Agreed upon]