From 82718cbc4c17681931ad5b1cf66d357f28079a04 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 24 Dec 2024 10:30:06 -0600 Subject: [PATCH] Add some debugging output --- nix/cache/cache.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nix/cache/cache.go b/nix/cache/cache.go index f7e6fae..bd3f03d 100644 --- a/nix/cache/cache.go +++ b/nix/cache/cache.go @@ -105,8 +105,9 @@ func downloadAndUploadIso(minioClient *minio.Client, iso IsoInfo) error { } log.Println("Uploading " + destPath) + uploadPath := "cache/" + iso.Distro + "/" + iso.Hash + ".iso" // Upload the file to MinIO - _, err = minioClient.PutObject(context.Background(), "isos", "cache/"+iso.Hash+".iso", uploadFile, fileInfo.Size(), minio.PutObjectOptions{ + _, err = minioClient.PutObject(context.Background(), "isos", uploadPath, uploadFile, fileInfo.Size(), minio.PutObjectOptions{ ContentType: "application/x-iso9660-image", }) if err != nil { @@ -118,6 +119,7 @@ func downloadAndUploadIso(minioClient *minio.Client, iso IsoInfo) error { func main() { endpoint := os.Getenv("STORAGE_URL") + log.Println("Using endpoint:", endpoint) accessKeyID := "root" secretAccessKey := os.Getenv("MINIO_SECRET") if secretAccessKey == "" {