Abu Musa Ashari reported,

The Prophet ﷺ said, "By Allah, if Allah wills, I do not swear an oath and then see something better than it without making expiation for my oath and doing what is better," or he said, "without doing what is better and making expiation for my oath."

Abu Dawud 3276

Sahih

حدثنا سليمان بن حرب حدثنا حماد حدثنا غيلان بن جرير

عن أبي بردة عن أبيه

أن النبي ﷺ قال إني والله إن شاء الله لا أحلف على يمين فأرى غيرها خيرا منها إلا كفرت عن يميني وأتيت الذي هو خير أو قال إلا أتيت الذي هو خير وكفرت يميني

أبو داود 3276صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Oaths and vows
Chapter
Man who expiates before breaking his oath
Numbering
Darussalam 3276
Abu Dawud 3276