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

File not found on rig config is silent for rig project #41

Open
grayside opened this issue May 26, 2017 · 2 comments
Open

File not found on rig config is silent for rig project #41

grayside opened this issue May 26, 2017 · 2 comments

Comments

@grayside
Copy link
Contributor

If you run rig project expecting to see your project scripts, but they are not there, there is no warning or verbose message that the config file could not be found.

We do not want such a message on rig commands in general, but when running rig project or rig project help, not having it could lead to troubleshooting confusion.

@grayside
Copy link
Contributor Author

There is already code that should be able to output such a warning. The problem is that cli/commands/project_config.go is re-initializing a Logger in NewProjectConfigFromFile() rather than leveraging the centrally instantiated Logger instance. As such, verbose output is sticking with the default behavior of being hidden.

We can fix this by using LoggerInit() again to create a fully-functional Logger instance, but that would require passthru of the verbose flag, which seems just as involved as passing the main logger instance.

However, passing the primary output mechanism around in function calls seems like poor form in how to leverage a "support library" such as project_config, maybe we should go back to the abortive attempt to return the error and have the caller decide what to do with it?

@grayside
Copy link
Contributor Author

This is something to address via rig project doctor, and thus is postponed on #58

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

No branches or pull requests

1 participant