diff --git a/.changes/fix-cmd-spawn-deadlock.md b/.changes/fix-cmd-spawn-deadlock.md new file mode 100644 index 00000000..0e2e6870 --- /dev/null +++ b/.changes/fix-cmd-spawn-deadlock.md @@ -0,0 +1,5 @@ +--- +"shell": patch +--- + +Fixes a deadlock when reading a stdout or stderr line returns an error. diff --git a/plugins/shell/src/process/mod.rs b/plugins/shell/src/process/mod.rs index b797be7e..fdb26897 100644 --- a/plugins/shell/src/process/mod.rs +++ b/plugins/shell/src/process/mod.rs @@ -385,6 +385,7 @@ fn spawn_pipe_reader) -> CommandEvent + Send + Copy + 'static>( block_on_task( async move { tx_.send(CommandEvent::Error(e.to_string())).await }, ); + break; } } }