There are several accounts of Iraqi nuclear program. Most believe they had the clandestine program but majority out of that most believe that the program was destroyed by the Israelis & was never pursued again. So if you go with the majority than the statement of Iraq having nuclear weapons program just before Kuwaiti invasion would be flawed.
Another account to Iraqi nuclear weapons, many say, that they never had any such program & did not have know how for the bomb. All they knew how to make was chemical & biological weapons.
On the subjective basis; if Iraq was few days away from making the 1st bomb than they could have waited few days before invading Kuwait. In fact just a test of the nuclear weapons would have removed the necessity for Iraq to invade Kuwait - it could have just dictated its policy to it.
If you ask me I walk between both the above accounts. Iraq may not have the bomb but whatever they could possibly could have used to make the bomb was destroyed by Israelis.
well what i said is all from a very long interview with an Iraqi nuclear scientist who was involved in the two Iraqi nuclear programs.
the Iraqi nuclear reactor which was bombed in 1981 by israel is Osirak reactor, built by support of France. its completely for scientific research and wasn't a threat for israel. however , the reactor was an excellent opurtunity for Iraqi nuclear scientists to gain the know-how and suffecient training in the nuclear field.
in ~1986 , the nuclear project was revived again but this time not for scientific research , it was entended entirely to produce nuclear bombs. this time the project was Iraqi 100% and was very confidential they even had specific policy when importing some pieces from outside to avoid any intelligence attraction. their plans worked and they were about to produce the 1st bomb after the invasion of Kuwait by few months. the Iraqi scientist criticized Saddam's decision of invasion and said he should've waited till the production of the nuclear bomb.
Saddam probably never thought he face such a global coalition. the Iraqi nuclear program is one of the reasons to force KSA to avoid a long term war with Iraq and instead to establish the coalition mainly with the US forces to ensure quick air strikes to destroy the Iraqi nuclear program before its too late.
this nuclear project was one of the main targets for the coalition air forces during Kuwait liberation war. it was completely destroyed in air strikes.