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 messages when required folders are missing #235

Closed
bodiam opened this Issue Nov 4, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@bodiam

bodiam commented Nov 4, 2015

Not the same as #21. I never used jbake before, so I installed it, ran 'jbake', and was greeted with the following output:

JBake v2.4.0 (2015-05-30 19:08:27PM) [http://jbake.org]

Error: Required folder cannot be found! Expected to find [template.folder] at: /Users/erikp/./templates
org.jbake.app.JBakeException: Error: Required folder cannot be found! Expected to find [template.folder] at: /Users/erikp/./templates
    at org.jbake.app.Oven.setupRequiredFolderFromConfig(Oven.java:122)
    at org.jbake.app.Oven.setupPaths(Oven.java:106)
    at org.jbake.launcher.Main.bake(Main.java:49)
    at org.jbake.launcher.Main.run(Main.java:86)
    at org.jbake.launcher.Main.main(Main.java:36)

I assumed my installation was broken, so I reinstalled it (I used gvmtool). But reinstalling gave the same issue. So, this apparently the way jbake communicates to me that this is not a project directory?

As a beginner user of jbake, this is a confusing message, and I think it would be great if it could be improved, for example, like git does:

Eriks-MacBook-Pro:~ $ git status
fatal: Not a git repository (or any of the parent directories): .git

could be

Eriks-MacBook-Pro:~ $ jbake
fatal: Not a jbake project (or any of other fancy message): .template folder missing

I don't even mind adding this myself if this is considered a good idea, and I'll continue to use jbake?

@mgfeller

This comment has been minimized.

Show comment
Hide comment
@mgfeller

mgfeller Nov 5, 2015

Contributor

I support this and I think it is a good idea to improve it.
It will make a better first impression of JBake.

Contributor

mgfeller commented Nov 5, 2015

I support this and I think it is a good idea to improve it.
It will make a better first impression of JBake.

@jonbullock

This comment has been minimized.

Show comment
Hide comment
@jonbullock

jonbullock Nov 5, 2015

Member

Thanks for raising this issue, you are correct being presented with this when you first run JBake is not great.

On a related topic I have been thinking that the default behaviour of the jbake command with no args should show the help rather than try and perform a bake using the current working directory as the source. It would force a change on users but one that I believe is logical.

Back to the issue at hand, I'd be more than happy if you added a more improved error message.

Member

jonbullock commented Nov 5, 2015

Thanks for raising this issue, you are correct being presented with this when you first run JBake is not great.

On a related topic I have been thinking that the default behaviour of the jbake command with no args should show the help rather than try and perform a bake using the current working directory as the source. It would force a change on users but one that I believe is logical.

Back to the issue at hand, I'd be more than happy if you added a more improved error message.

@bodiam

This comment has been minimized.

Show comment
Hide comment
@bodiam

bodiam Nov 5, 2015

Super, good to hear! I'll try to add it tomorrow or in the weekend, it would be a nice start to contribute.

I also agree with the jbake noargs command, I think it should just display the usage instruction. I can add that too, and update the documentation on it.

bodiam commented Nov 5, 2015

Super, good to hear! I'll try to add it tomorrow or in the weekend, it would be a nice start to contribute.

I also agree with the jbake noargs command, I think it should just display the usage instruction. I can add that too, and update the documentation on it.

@jonbullock jonbullock added this to the v2.5.0 milestone Jan 14, 2016

@jonbullock jonbullock self-assigned this Jan 14, 2016

@jonbullock jonbullock closed this in 7248d37 Jul 4, 2016

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