From f85be98e72ecf668bc06fc2612788f4723e4118d Mon Sep 17 00:00:00 2001 From: David Berlin Date: Sun, 10 Mar 2024 08:55:18 +0200 Subject: [PATCH 1/2] fix: pass api host to @netlify/build --- src/utils/run-build.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/run-build.ts b/src/utils/run-build.ts index a4307b6f688..7ec3cb35708 100644 --- a/src/utils/run-build.ts +++ b/src/utils/run-build.ts @@ -57,7 +57,7 @@ const cleanInternalDirectory = async (basePath) => { */ // @ts-expect-error TS(7031) FIXME: Binding element 'command' implicitly has an 'any' ... Remove this comment to see the full error message export const runNetlifyBuild = async ({ command, env = {}, options, settings, timeline = 'build' }) => { - const { cachedConfig, site } = command.netlify + const { apiOpts, cachedConfig, site } = command.netlify const { default: buildSite, startDev } = await netlifyBuildPromise @@ -66,6 +66,7 @@ export const runNetlifyBuild = async ({ command, env = {}, options, settings, ti configPath: cachedConfig.configPath, siteId: cachedConfig.siteInfo.id, token: cachedConfig.token, + host: apiOpts.host, dry: options.dry, debug: options.debug, context: options.context, From 357bb7be05541c4e5fd287f48c509c1ea2c3b14c Mon Sep 17 00:00:00 2001 From: David Berlin Date: Mon, 11 Mar 2024 11:53:57 +0200 Subject: [PATCH 2/2] fix: use apiHost --- src/utils/run-build.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/run-build.ts b/src/utils/run-build.ts index 7ec3cb35708..055a67b27a8 100644 --- a/src/utils/run-build.ts +++ b/src/utils/run-build.ts @@ -66,7 +66,7 @@ export const runNetlifyBuild = async ({ command, env = {}, options, settings, ti configPath: cachedConfig.configPath, siteId: cachedConfig.siteInfo.id, token: cachedConfig.token, - host: apiOpts.host, + apiHost: apiOpts.host, dry: options.dry, debug: options.debug, context: options.context,