function runHook -S -a name force message
    if type -q "$name"
        "$name"
        or exit 1
    else if $force
        if test -n "$message"
            echo "$message"
        end

        exit 1
    else
        return 1
    end
end