Skip to content

Commit 07cc578

Browse files
authored
Added condition to change value of port when options.port value is specified. (#5531)
1 parent c05b9cd commit 07cc578

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
- Allow configuration of the Cloud Function generated for full-stack web frameworks (#5504)
2+
- Fixes bug where passing `--port` flag in `functions:shell` does not set which port to emulate functions (#5521)
23
- Improve error message during deploy when given invalid hosting rewrite rule (#5533)
34
- Generate ESM-compatible SSR function for web frameworks (#5540)

src/functionsShellCommandAction.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ export const actionFunction = async (options: Options) => {
4949
// If the port was not set by the --port flag or determined from 'firebase.json', just scan
5050
// up from 5000
5151
let port = 5000;
52+
if (typeof options.port === "number") {
53+
port = options.port;
54+
}
55+
5256
const functionsInfo = remoteEmulators[Emulators.FUNCTIONS];
5357
if (functionsInfo) {
5458
utils.logLabeledWarning(

0 commit comments

Comments
 (0)