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

Added check for token environment variable #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bashfulrobot
Copy link

@bashfulrobot bashfulrobot commented Oct 14, 2022

Hey Patrick, quick and dirty check to see if the environment variable exists.

  • since the previous "if" checks for the cli flag and sets the env var token, we can assume the environment variable should be set at this point. We then check for the environment variable to see if it is set. If the token is not set at this point, display a message and exit out (1).
  • there likely is a better solution?

- since the previous "if" checks for the cli flag and sets the token,
we can assume the environment variable should be set at this point.
We then check for the environment variable and assume the token is
not set at this point.
- Likely a better solution.

Changes to be committed:
	modified:   cmd/mapper.go
- removed extra space in if statement

Changes to be committed:
	modified:   cmd/mapper.go
- Failure on missing ENV var, even if the token is present via
  the cli flag

Changes to be committed:
	modified:   cmd/mapper.go
@bashfulrobot
Copy link
Author

This might be stale or just need to be closed off.

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.

2 participants