diff --git a/CHANGELOG.md b/CHANGELOG.md index e8ec64aa51f..c34f3d920f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ - Allow configuration of the Cloud Function generated for full-stack web frameworks (#5504) +- Fixes bug where passing `--port` flag in `functions:shell` does not set which port to emulate functions (#5521) - Improve error message during deploy when given invalid hosting rewrite rule (#5533) - Generate ESM-compatible SSR function for web frameworks (#5540) diff --git a/src/functionsShellCommandAction.ts b/src/functionsShellCommandAction.ts index e6ac89148eb..9d637803aae 100644 --- a/src/functionsShellCommandAction.ts +++ b/src/functionsShellCommandAction.ts @@ -49,6 +49,10 @@ export const actionFunction = async (options: Options) => { // If the port was not set by the --port flag or determined from 'firebase.json', just scan // up from 5000 let port = 5000; + if (typeof options.port === "number") { + port = options.port; + } + const functionsInfo = remoteEmulators[Emulators.FUNCTIONS]; if (functionsInfo) { utils.logLabeledWarning(