That’s not how it works. There’s a long line of diplomacy that countries need to follow. Given Indian Government is more sensible that Pak’s, it won’t really go all-out attacking Pakistan. India won’t wage a formal war against its neighbor.
This whole issue is not just only about India and Pakistan. Other countries, indirectly, are involved too. Like Pak has full support of China. And India gets along with USA very well. If something big really happens between the two neighboring countries, the wholes global scene can see turmoil in one way or other.
Plus, India holds a moral upper-hand on the global platform. The world knows what Pakistan do, their tactics, how they foul India on every front. And the world knows just how sensibly India reacts all the time, without getting carried away in the heat of the moment. So yes, India has an upper-hand in this whole issue.So these are few reasons why India doesn’t attacks Pakistan even after continuous provocation by its arm and breeding terrorists. India though always gives befitting reply to the neighbors without escalating things to a worse level.