Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix runtime panic if not logged in #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mraerino
Copy link
Member

Fixes #39

This changes the credential access token logic in a way that it throws an error if automatic login via cli is not possible (missing TTY). This happens when the helper is run by git.

Throwing an error at that place makes sense once the purpose of the login function is to always return valid credentials. Which it can not if there is no tty.

Test plan

  • compiled locally and copied to ~/.netlify/helper/git-credential-netlify
  • prepared netlify-cli without being logged in
  • git clone my-repo-with-lm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runtime error: Slice bounds out of range
1 participant