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

Intelligent error handling and logging #12

Open
doesntgolf opened this issue Jan 22, 2016 · 1 comment
Open

Intelligent error handling and logging #12

doesntgolf opened this issue Jan 22, 2016 · 1 comment
Labels

Comments

@doesntgolf
Copy link
Member

We currently have some very basic logging and error handling. I know there's at least one spot where we're just throwing errors away though. Also, the main spot that I have in mind is handling exec.Command("hugo") better.

I tried briefly to add error handling to this when I was working on #2 but quickly broke everything and decided to skip it (sorry for not logging what I did better). If Hugo doesn't build correctly we shouldn't continue, we should stop and throw a helpful error instead of serving the wrong content.

Eventually, it'd also be cool to be able to have the topiary command run from anywhere in the Hugo site file tree and be able to figure it out and work correctly. And if topiary is run where there isn't a Hugo site, we should offer to start one or find an existing one on disk (in the browser UI). (This should be part of the flow that will be created in #4.)

@doesntgolf doesntgolf added the bug label Jan 22, 2016
@jbeane
Copy link
Contributor

jbeane commented Jan 25, 2016

exec.Command("hugo") is a little better now, but not great. see lines 13-19: commit

now exec.Command("hugo") is wrapped in some error handling and here's what is output by log.Fatal(err) when trying to run topiary in a directory without a hugo site installed.

2016/01/24 22:24:04 exit status 255

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

No branches or pull requests

2 participants