Skip to content

Commit

Permalink
fix(stdio): processstartmode.inheritstdio incompat with inheritstdio
Browse files Browse the repository at this point in the history
When using `mode: ProcessStartMode.inheritStdio` this causes the process
to hang if `inheritStdio: true`.

Also the naming here is confusing, in a future "MAJOR" version this will
resolved. But basically `inheritStdio` is our async functionality that
allows multiple processes to interleave their stdio.

Where as `ProcessStartMode.inheritStdio` is darts built-in way of directly
connecting the child process to the parent stdio streams.

This fix makes these options mutually exclusive.
  • Loading branch information
brad-jones committed May 12, 2020
1 parent 37a56bb commit 1f08f17
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/dexeca.dart
Expand Up @@ -31,6 +31,11 @@ Process dexeca(
}
}

if (mode == io.ProcessStartMode.inheritStdio) {
inheritStdio = false;
captureOutput = false;
}

return Process(
waitFor(io.Process.start(
exe,
Expand Down

0 comments on commit 1f08f17

Please sign in to comment.