dideler / dotfiles

:page_facing_up: These are my dotfiles. There are many like them, but these are mine.
MIT License
25 stars 4 forks source link

Fix gh-clone-all auth error #24

Open dideler opened 2 years ago

dideler commented 2 years ago

When the auth step fails, we don't handle it properly. Instead the scripts runs in a degraded state.

github.com
  X github.com: the token in GITHUB_TOKEN is missing required scope 'read:org'

fish: Unknown command: \{\n\ \ \ \ echo\ Must\ authenticate\ via\ GitHub\ CLI:\ gh\ auth\ login\ 1\>\&2\n\ \ \ \ exit\ 1\n\ \ \}
~/.config/fish/functions/gh-clone-all.fish (line 2): '{ ... }' is not supported for grouping commands. Please use 'begin; ...; end'
  gh auth status >/dev/null || {
    echo "Must authenticate via GitHub CLI: gh auth login" 1>&2
    exit 1
  }