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

include file not working for relative path (for non-default conf) #594

Open
purijatin opened this issue Oct 8, 2018 · 2 comments
Open

Comments

@purijatin
Copy link

Here is my folder structure:

a/b/c/app.conf
a/b/c/1.conf
a/b/c/2.conf

The contents of app.conf is:

app {
  include required(file("1.conf"))
  include required(file("2.conf"))
}

When I load the file a/b/c/app.conf via:

ConfigFactory.parseFile("a/b/c/app.conf")

This results in the below exception:

Caused by: com.typesafe.config.ConfigException$IO: 1.conf: java.io.FileNotFoundException: 1.conf (No such file or directory)
	at com.typesafe.config.impl.Parseable.parseValue(Parseable.java:188)
	at com.typesafe.config.impl.Parseable.parseValue(Parseable.java:174)
	at com.typesafe.config.impl.Parseable.parse(Parseable.java:152)

It works if I mention the path as required(file(a/b/c/1.conf)) inside app.conf instead. What can I do so that the path is taken relatively.

@havocp
Copy link
Collaborator

havocp commented Oct 8, 2018

I think it is this bug:
#202

@purijatin
Copy link
Author

Ok.
Thanks for the quick response.

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

2 participants