diff --git a/apps/backend/src/api/hex_repo.gleam b/apps/backend/src/api/hex_repo.gleam index 9e1e0cb..a6bae72 100644 --- a/apps/backend/src/api/hex_repo.gleam +++ b/apps/backend/src/api/hex_repo.gleam @@ -52,7 +52,9 @@ fn create_archive( archive: BitArray, ) { let slug = package_slug(name, version) <> ".tar" - let filepath = archives_path <> "/" <> name <> "/" <> slug + let package_path = archives_path <> "/" <> name + let _ = simplifile.create_directory_all(package_path) + let filepath = package_path <> "/" <> slug let _ = simplifile.write_bits(filepath, archive) archive }