File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -270,15 +270,15 @@ export const buildCommand: yargs.CommandModule<
270
270
// eslint-disable-next-line no-constant-condition
271
271
while ( true ) {
272
272
const res = await fetch ( portInfo . getPreviewUrl ( ) ) ;
273
- if ( res . status < 400 ) {
273
+ if ( res . status !== 502 && res . status !== 503 ) {
274
274
spinner . succeed ( `Port ${ port } is open (status ${ res . status } )` ) ;
275
275
break ;
276
- } else {
277
- spinner . fail (
278
- `Port ${ port } is not open yet (status ${ res . status } ), retrying in 1 second...`
279
- ) ;
280
- await new Promise ( ( resolve ) => setTimeout ( resolve , 1000 ) ) ;
281
276
}
277
+
278
+ spinner . fail (
279
+ `Port ${ port } is not open yet (status ${ res . status } ), retrying in 1 second...`
280
+ ) ;
281
+ await new Promise ( ( resolve ) => setTimeout ( resolve , 1000 ) ) ;
282
282
}
283
283
284
284
tasksWithPorts = tasksWithPorts . filter ( ( t ) => t . id !== task . id ) ;
You can’t perform that action at this time.
0 commit comments