Kind of odd that the check for garage comes before the call to normalizeHostname().
Normalizing the hostname turns garage.github.com into github.com, so it's a bit too late to check for garage afterwards. However, normalizing garage.github.com as github.com elsewhere is beneficial for token reuse: since it's technically not possible to complete the web browser flow gh auth login -h garage.github.com, the regular github.com token will be used for authenticating to garage environment.
Normalizing the hostname turns
garage.github.com
intogithub.com
, so it's a bit too late to check for garage afterwards. However, normalizinggarage.github.com
asgithub.com
elsewhere is beneficial for token reuse: since it's technically not possible to complete the web browser flowgh auth login -h garage.github.com
, the regulargithub.com
token will be used for authenticating to garage environment.