Fix process forwarding of

Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
Emmanuel Bigeon 2018-10-27 14:42:22 -04:00
parent 265f90526a
commit 1fa9ca213e

View File

@ -101,7 +101,10 @@ public class ExecSystemCommand extends Command {
try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os))) {
while (th.isAlive()) {
final String user = in.prompt();
writer.write(user + EOL);
// Avoid interruption being sent to process.
if (!user.isEmpty()) {
writer.write(user + EOL);
}
}
} catch (final IOException e1) {
throw new CommandRunException(CommandRunExceptionType.INTERACTION,