Skip to content

Commit

Permalink
feat: Added a module that finds the user home directory. (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
testersen authored Jun 3, 2024
1 parent d71e3a8 commit ca63fd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package io.tnboot.util.homedir

fun homedir() = System.getProperty("user.home") ?: System.getenv("HOME") ?: System.getenv("USERPROFILE")
?: throw IllegalStateException("Cannot determine home directory")
4 changes: 4 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ include(
":projects:logging:colorful",
":projects:logging:logging-model",
)

include(
":util:util-homedir",
)

0 comments on commit ca63fd2

Please sign in to comment.