File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1- import { hookConsole , hookFork } from '@dotcom-tool-kit/logger'
1+ import { hookConsole , hookFork , styles } from '@dotcom-tool-kit/logger'
22import { writeState } from '@dotcom-tool-kit/state'
33import { Task , TaskRunContext } from '@dotcom-tool-kit/base'
44import { DopplerEnvVars } from '@dotcom-tool-kit/doppler'
@@ -85,11 +85,19 @@ export default class Node extends Task<{ task: typeof NodeSchema }> {
8585 if ( port ) {
8686 const unhook = hookConsole ( this . logger , 'wait-port' )
8787 try {
88- await waitPort ( {
88+ const { open } = await waitPort ( {
8989 host : 'localhost' ,
9090 port,
9191 timeout : this . options . portTimeout
9292 } )
93+
94+ if ( this . options . portTimeout && ! open ) {
95+ this . logger . warn (
96+ `Node process didn't listen on port ${ styles . code ( port ) } within ${ styles . code (
97+ this . options . portTimeout
98+ ) } ms`
99+ )
100+ }
93101 } finally {
94102 unhook ( )
95103 }
You can’t perform that action at this time.
0 commit comments