Skip to content

Commit f6e8dce

Browse files
committed
Pass apiDetails to getApiClient in uploadBundledDatabase
1 parent a08b587 commit f6e8dce

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎lib/entry-points.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/database-upload.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,10 @@ async function uploadBundledDatabase(
267267
bundledDbSize: number,
268268
apiDetails: GitHubApiDetails,
269269
): Promise<number> {
270-
const client = getApiClient();
270+
// Ensure that the `apiDetails` that `getApiClient` uses match the ones we were given here,
271+
// because we use `apiDetails.auth` below which must be used with the same instance that
272+
// `apiDetails` refers to.
273+
const client = getApiClient(util.getEnv(), apiDetails);
271274

272275
const uploadsUrl = new URL(parseGitHubUrl(apiDetails.url));
273276
uploadsUrl.hostname = `uploads.${uploadsUrl.hostname}`;

0 commit comments

Comments
 (0)