"Whoever swears an oath and says: 'If Allah wills', then if he wishes he may go ahead, and if he wishes he may not, without having broken his oath." (Using translation from Nasāʾī 3793)
أَنَّ النَّبِيَّ ﷺ قَالَ مَنْ حَلَفَ فَاسْتَثْنَى فَإِنْشَاءَ مَضَى وَإِنْ شَاءَ رَجَعَ غَيْرَ حَنِثٍ