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

Don't raise on missing config file #80

Merged
merged 2 commits into from
May 13, 2016

Conversation

chrisarcand
Copy link
Collaborator

@chrisarcand chrisarcand commented May 12, 2016

Features were added that cause eager loading of the configuration file for default command flags. This causes Octopolo to exit in error instead of providing help information and allowing you to set up Github auth for your user when you don't have a config file. That should be allowed.

This changes Octopolo to merely print a nice warning message saying it couldn't find your config file, allowing you access to those other functions. Also bubbles up messages from the Github wrapper which isn't so bad at all:

$ op view-pr
*** WARNING: Could not find .octopolo.yml or .automation.yml ***
An error occurred while getting the current branch: GitHub Repo is required

Fixes #76

r? @anfleene

The configuration file is eager loaded for user-specific command line
defaults. That means that we can't just "lol you haz no config, bye"
when searching through paths for it.

This allows for the config path to be empty and gives a nice warning
instead.
@anfleene
Copy link

This looks great. I'll do a bit of QA and then draft a release for it.

@anfleene
Copy link

BAM looks good 👍

$ be bin/op github-auth
*** WARNING: Could not find .octopolo.yml or .automation.yml ***
Would you like to generate an GitHub API token with your credentials or enter one manually?
You *must* enter a token manually if you are using GitHub's Two Factor Authentication.
For more information, see https://help.github.com/articles/creating-an-access-token-for-command-line-use

1) Generate an API token with my credentials
2) I'll enter an access token manually
> error:
$ be bin/op view-pr 10
*** WARNING: Could not find .octopolo.yml or .automation.yml ***
An error occurred while getting the current branch: GitHub Repo is required

@anfleene anfleene merged commit 19ceafd into sportngin:master May 13, 2016
@anfleene
Copy link

V1.2.1 is out on rubygems 🎉

@panderson74
Copy link

Thanks @chrisarcand !

@chrisarcand
Copy link
Collaborator Author

❤️

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.

None yet

3 participants