Add a scriptable check for valid credentials (#182)
Add a scriptable check for valid credentials (#182)

This allows users to `taskcluster signin --check` and get
an exit code of 1 if their credentials are either not found,
or expired.

I've successfully used it with this bash wrapper:

tc() {
    if ! TC=$(which taskcluster)
    then
        echo "Unable to find taskcluster command"
        return
    fi

    CLIENTVARS=${TASKCLUSTER_CLIENT_STORE:-"/dev/shm/tcclient.creds"}
    if [ -f "$CLIENTVARS" ] ; then
        # shellcheck source=/dev/null
        source "$CLIENTVARS"
    fi

    if ! ${TC} signin --check; then
        ${TC} signin > "$CLIENTVARS"
        # shellcheck source=/dev/null
        source "$CLIENTVARS"
    fi
    ${TC} "$@"
}
taskcluster/taskcluster-cli