diff --git a/src/main/java/org/quiltmc/loader/impl/util/GlobalPaths.java b/src/main/java/org/quiltmc/loader/impl/util/GlobalPaths.java index 9b33ed9f2..4b73f556c 100644 --- a/src/main/java/org/quiltmc/loader/impl/util/GlobalPaths.java +++ b/src/main/java/org/quiltmc/loader/impl/util/GlobalPaths.java @@ -33,6 +33,9 @@ public static Path getConfigDir() { if (os.contains("win")) { String configHome = System.getenv("LOCALAPPDATA"); + if (configHome == null) { + throw new RuntimeException("Missing env 'LOCALAPPATA' for '" + os + "'"); + } Path base = Paths.get(configHome); config = base.resolve("QuiltMC").resolve("QuiltLoaderAndMods"); @@ -67,6 +70,9 @@ public static Path getCacheDir() { if (os.contains("win")) { String configHome = System.getenv("LOCALAPPDATA"); + if (configHome == null) { + throw new RuntimeException("Missing env 'LOCALAPPATA' for '" + os + "'"); + } Path base = Paths.get(configHome); cache = base.resolve("QuiltMC").resolve("QuiltLoaderAndMods").resolve("Cache");