If the person upon whom the writ is served refuses or neglects to obey it within the time required, and no sufficient excuse is shown, it is the duty of the court before whom the writ is returnable, upon due proof of service, to immediately issue a warrant against that person, directed to a peace officer commanding the officer to immediately apprehend and bring the person before the court. Upon that person being brought before the court, the court shall commit that person to custody until the person makes return to the writ and complies with any order that may be made.