Skip to content

Commit ebde5e6

Browse files
authored
await compose runner messages (#2156)
1 parent 5707102 commit ebde5e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/command/supergraph/compose/do_compose.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use semver::Version;
1515
use serde::Serialize;
1616
use std::io::Read;
1717
use tempfile::NamedTempFile;
18+
use tokio::join;
1819
use tokio_stream::StreamExt;
1920

2021
use rover_client::shared::GraphRef;
@@ -195,12 +196,14 @@ impl Compose {
195196
let runner =
196197
crate::composition::runner::Runner::new(supergraph_config, supergraph_binary);
197198
let mut messages = runner.run().await?;
198-
tokio::task::spawn(async move {
199+
let join_handle = tokio::task::spawn(async move {
199200
while let Some(message) = messages.next().await {
200201
eprintln!("{:?}", message);
201202
}
202203
});
203204

205+
join!(join_handle).0?;
206+
204207
return Ok(RoverOutput::EmptySuccess);
205208
}
206209
let mut supergraph_config = get_supergraph_config(

0 commit comments

Comments
 (0)