Skip to content

Commit

Permalink
loader tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Dec 3, 2017
1 parent 9ddaacd commit 8649b6a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ Dotenv is a zero-dependency module that loads environment variables from a `.env
<dependency>
<groupId>io.github.cdimascio</groupId>
<artifactId>java-dotenv</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</dependency>
```

### Gradle

```
compile 'io.github.cdimascio:java-dotenv:1.0.0'
compile 'io.github.cdimascio:java-dotenv:1.0.1'
```


Expand Down
2 changes: 1 addition & 1 deletion java-dotenv-1.0.0.pom → java-dotenv-1.0.1.pom
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>io.github.cdimascio</groupId>
<artifactId>java-dotenv</artifactId>
<version>0.7.1</version>
<version>1.0.1</version>


<licenses>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>io.github.cdimascio</groupId>
<artifactId>java-dotenv</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>


<licenses>
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/io/github/cdimascio/Dotenv.kt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ private object PathResolver {
val useFileScheme = directory.toLowerCase().startsWith("file:")
val fullPath = if (isFullPath) directory else "$directory${File.separator}$filename"
var path = if (useFileScheme) Paths.get(URI.create(fullPath)) else Paths.get(fullPath)
path = path.normalize()

if (!Files.exists(path, *arrayOfNulls<LinkOption>(0))) {
path = javaClass.classLoader.getResource(fullPath)?.let {
Expand Down

0 comments on commit 8649b6a

Please sign in to comment.