more robust rebar post_hook