File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
runner/client/src/mill/runner/client Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,14 @@ final class JLineNativeLoader {
3939 System .getProperty ("os.name" ).toLowerCase (Locale .ROOT ).startsWith ("windows" );
4040 final Path baseDir ;
4141 if (isWindows ) baseDir = Paths .get (System .getenv ("UserProfile" )).resolve (".mill/cache/" );
42- else baseDir = Paths .get (System .getProperty ("user.home" )).resolve (".cache/mill/" );
42+ else {
43+ final String xdgCacheHome = System .getenv ("XDG_CACHE_HOME" );
44+ final Path cacheBase ;
45+ if (xdgCacheHome == null )
46+ cacheBase = Paths .get (System .getProperty ("user.home" )).resolve (".cache" );
47+ else cacheBase = Paths .get (xdgCacheHome );
48+ baseDir = cacheBase .resolve ("mill" );
49+ }
4350 this .millJLineNativeDir = baseDir .resolve ("jline/" + jlineNativeVersion );
4451 this .millJLineNativeLibLocation =
4552 millJLineNativeDir .resolve (OSInfo .getNativeLibFolderPathForCurrentOS () + "/"
You can’t perform that action at this time.
0 commit comments