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

Improve error display #10

Open
justinrubek opened this issue Mar 20, 2023 · 0 comments
Open

Improve error display #10

justinrubek opened this issue Mar 20, 2023 · 0 comments

Comments

@justinrubek
Copy link
Owner

When using thoenix terraform .., the first action of command is to build a terraformConfiguration, but if this operation fails the error message is simply logged using tracing::error. The information needed is available, but it is mangled into a form that is not user friendly.

This should be displayed nicely.

an example: If there is an error evaluating a flake everything will be put onto a single line as \n is printed literally, like this

➜ thoenix terraform github apply
2023-03-20T03:17:26.065416Z  INFO thoenix::terraform: self.args=["apply"] self.configuration_name="github"
2023-03-20T03:17:26.065436Z  INFO thoenix::terraform: building terraform configuration
2023-03-20T03:17:26.351876Z ERROR thoenix::terraform: "warning: Git tree '/home/justin/home' is dirty\nerror: attribute 'flake' missing\n\n       at /nix/store/fbc9m0gnlgwnna1kjk03py79xwdllnxy-configurations/github/main.nix:25:66:\n\n           24|     # e.g. mkTopic [\"nix\" \"rust\"] -> [\"nix\" \"nix-flake\" \"rust\"]\n           25|     mkTopic = groups: builtins.concatLists (builtins.map (group: topics.${group}) groups);\n             |                                                                  ^\n           26|   in {\n       Did you mean flakes?\n(use '--show-trace' to show detailed location information)\n"
Error: Nix(1)
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

No branches or pull requests

1 participant