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 doesn't work probably for relative paths #139

Open
Etcham opened this issue Aug 18, 2024 · 0 comments
Open

Include file doesn't work probably for relative paths #139

Etcham opened this issue Aug 18, 2024 · 0 comments
Labels

Comments

@Etcham
Copy link

Etcham commented Aug 18, 2024

Description

I made 3 different .conf files where conf_file1 includes conf_file2, and conf_file2 includes conf_file3, each include the conf_file with relative path to it.
I put the 3 files in the same directory where I should include any of them using include file("conf_file2.conf"). I have also put the exe of the built cpp-application parsing these files in the parent directory.
The structure looks like this:
parent_dir
|
simple_cpp_linux_app.stexe
|
config_files
|
config_file1
|
config_file2
|
config_file3

When I write in config_file1 include file("conf_file2.conf"), it doesn't get resolved and the file is not included. But, if I write it like this include file("./config_files/conf_file2.conf"), it resolves and included the file successfully.
Note that this happens only for the first include, second file (config_file2) includes config_file3 normally (include file("conf_file3.conf"),)

Expected behavior

The expected behavior as described here hocon documentation shows that relative paths should work relative to including file.

Steps to Reproduce

Create a simple cpp-hocon application that parses some .conf file that includes another .conf file where executable is in a different path than the .conf files. Run the application.

Environment

  • Version [e.g. 3.10.0]
  • Platform [e.g. redhat 7.9]
@Etcham Etcham added the bug label Aug 18, 2024
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

1 participant