Empty MISE_GITHUB_TOKEN is not valid
Opened this issue · 0 comments
Methy659 commented
Describe the bug
If you have a invalid GITHUB_TOKEN set, setting MISE_GITHUB_TOKEN to empty does not skip the rest of the checks. - same issue as: #2910
The changes made in https://github.com/jdx/mise/pull/2915/files#diff-4da8e8ee5c65a27bd048a2f2e55de0a9c75e87618fc02e17b235cc5413e625a0R160 does not respect empty value for MISE_GITHUB_TOKEN.
To Reproduce
#2910 (comment)
# Base image
FROM debian:bullseye-slim
# Install dependencies
RUN apt-get update && apt-get install -y \
curl \
bash \
gnupg \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install mise
RUN curl https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh && \
echo 'eval "$(mise activate bash)"' >> /etc/profile && \
mkdir -p .local/share/mise
# Set environment variables
ENV MISE_GITHUB_TOKEN=""
ENV GITHUB_TOKEN="invalid_token"
# Set cmd to attempt installing a package using mise
CMD bash -c "/usr/local/bin/mise --version && /usr/local/bin/mise install github-cli@2.4.0"
Expected behavior
Treats MISE_GITHUB_TOKEN as a valid value even if it’s empty, stopping further lookups.