New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: pass api host to @netlify/build #6424
Conversation
📊 Benchmark resultsComparing with b4d8fec
|
src/utils/run-build.ts
Outdated
@@ -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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the property called apiHost
instead of host
? https://github.com/netlify/build/blob/2d10996ee91e7640be0e4b53105ae30cb42752fe/packages/build/src/core/normalize_flags.ts#L94
Also, we're already doing something similar here. I understand these are currently different entry points into @netlify/build
, but it'd be nice to at least standardise the way we pass these properties so it's easier for us to consolidate things into a single entry point in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, not sure what happened there!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re standardization - apiOpts
seemed like the best way because it's defined in base-command
, but open for suggestions 😄
If API host is configured to staging, currently CLI will use that but
@netlify/build
will use production.To fix this we need to pass in the configured host to
@netlify/build
.