-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix classpath relative-to-absolute conversion in DotenvReader (#27)
* Fix classpath relative-to-absolute conversion in DotenvReader Escape "." to prevent removing the trailing character from a simple directory name with no leading "/" or "./" Anchor the regex to prevents stripping a trailing literal "." from a directory name, which is unlikely but possible Add tests for simple resource directory and resource directory with trailing "." Examples of bug: .directory("envdir") would try to load "resources/envdi/.env" and fail. .directory("/trailingdot./envdir") would try to load "resources/trailingdot/envdir/.env") and fail. * Rename dirTest to assertDirectory to satisfy Codacy Static Code Analysis Co-authored-by: Clement Cherlin <ccherlin@dminc.com>
- Loading branch information
Showing
4 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
## Good test EV | ||
MY_TEST_EV1=Simple Subdirectory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
## Good test EV | ||
MY_TEST_EV1=Trailing Dot Directory With Subdirectory |