You were very lucky !
The last time that happened to me was at the MOT testing station....after the last press of the pedal, while he was testing the handbrake.
He never noticed the burst pipe, turned round, wrote out the pass cert, and then I drove home on the handbrake.
Replaced the brake pipe myself.