Skip to content

Commit a86fd9b

Browse files
committed
fail fast when CLI exits before reporting TCP port
1 parent b79133d commit a86fd9b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

go/client.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,10 @@ func (c *Client) startCLIServer(ctx context.Context) error {
11521152
select {
11531153
case <-timeout:
11541154
killErr := c.killProcess()
1155-
return errors.Join(fmt.Errorf("timeout waiting for CLI server to start"), killErr)
1155+
return errors.Join(errors.New("timeout waiting for CLI server to start"), killErr)
1156+
case <-c.processDone:
1157+
killErr := c.killProcess()
1158+
return errors.Join(errors.New("CLI server process exited before reporting port"), killErr)
11561159
default:
11571160
if scanner.Scan() {
11581161
line := scanner.Text()

0 commit comments

Comments
 (0)