gtx


Branch: develop

Author
thewhodidthis <thewhodidthis@fastmail.com>
Date
Feb. 18 '23 11:05:32
Commit
9330711d850323837da82d054591b556f696872b
Parent
ac38877e72e3d4883445d269d06868ed0f4d406b
Changes
diff --git a/main.go b/main.go
index 1e39fbc..c145cc8 100644
--- a/main.go
+++ b/main.go
@@ -163,19 +163,13 @@ func main() {
 		log.Fatalf("unable to save options: %v", err)
 	}
 
-	ucd, err := os.UserCacheDir()
+	tmp, err := os.MkdirTemp("", "")
 
 	if err != nil {
-		log.Fatalf("unable to locate user cache folder: %s", err)
+		log.Fatalf("unable to locate temporary host directory: %s", err)
 	}
 
-	tmp, err := os.MkdirTemp(ucd, "gtx-*")
-
-	if err != nil {
-		log.Fatalf("unable to locate temporary host dir: %s", err)
-	}
-
-	log.Printf("user cache set: %s", tmp)
+	defer os.RemoveAll(tmp)
 
 	pro := NewProject(dir, tmp, opt)