Directory configuration not working correctly
See original GitHub issueOS: MacOS v10.13.4 Java version: JavaSE-1.8 Dotenv version: 3.1.0
When configuring the directory Dotenv
uses it seems to make a difference weather or not you use a dot in the path.
The following code works just fine:
Dotenv env = Dotenv.configure().directory("./").load();
However this code throws an error:
Dotenv env = Dotenv.configure().directory("/").load();
Exception in thread "main" io.github.cdimascio.dotenv.DotEnvException: Could not find /.env on the classpath
at io.github.cdimascio.dotenv.internal.ClasspathHelper.loadFileFromClasspath(ClassPathHelper.kt:28)
at io.github.cdimascio.dotenv.internal.DotenvReader.read(DotenvReader.kt:26)
at io.github.cdimascio.dotenv.internal.DotenvParser.parse(DotenvParser.kt:18)
at io.github.cdimascio.dotenv.DotenvBuilder.load(Dotenv.kt:48)
at dotenv_test.Main.main(Main.java:9)
Removing the configuration entirely should according to the documentation load the dotenv
file from the root of the project: ./
however this throws an error too. Which seems especially weird to me.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Domain controller is not functioning correctly - Windows Server
Provides common resolutions to issues where you cannot open Active Directory snap-ins or connect to a domain controller from another ...
Read more >Techniques to troubleshoot Active Directory issues - TechTarget
When a problem arises, there are several simple procedures you should follow as part of the process to troubleshoot Active Directory.
Read more >Directory config name is invalid" | Nutanix Community
I just keep getting the error message "Directory config name is invalid". I can ping the DC host from the CVM using the...
Read more >Directory Agent cannot connect to the domain controller
Go to the Web > Settings > General > Directory Services page in the TRITON Manager and verify that your directory service configuration...
Read more >Troubleshooting Open Directory, Part 1 | Computerworld
When Open Directory is properly configured, there's very little troubleshooting that needs to be done; it simply does its job, and everything generally...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ahh I see. That’s totally fixed. I included the
resources
folder undersrc/main
instead of in the root of the project.Excellent! I added the example to the
README
. closing this out