Skip to content
This repository was archived by the owner on Dec 7, 2019. It is now read-only.

Run command as is in Windows even with unbuffered mode.#14

Merged
yunikkk merged 1 commit intogojuno:masterfrom
yunikkk:dont-buffer-on-windows
Feb 27, 2018
Merged

Run command as is in Windows even with unbuffered mode.#14
yunikkk merged 1 commit intogojuno:masterfrom
yunikkk:dont-buffer-on-windows

Conversation

@yunikkk
Copy link
Copy Markdown
Contributor

@yunikkk yunikkk commented Feb 25, 2018

Continuation of #4 .

@@ -50,15 +50,15 @@ fun process(

val command: List<String>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it is possible to make it like this:

val command: List<String> = if (unbufferedOutput) {
    commandAndArgs
} else {
    when (os()) {
        Linux -> listOf()
        Mac -> listOf()
        Windows -> commandAndArgs
    }
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, sure

true -> when (os()) {
// Some programs, in particular "emulator" do not always flush output
// after printing so we have to force unbuffered mode to make sure
// that output will be available for consuming.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation went off a bit.

@yunikkk yunikkk force-pushed the dont-buffer-on-windows branch from 7d9a577 to d6b1b5c Compare February 25, 2018 17:48
@artem-zinnatullin
Copy link
Copy Markdown
Contributor

👍

@artem-zinnatullin
Copy link
Copy Markdown
Contributor

@yunikkk your git config is broken as usual lol, fix email!

@yunikkk
Copy link
Copy Markdown
Contributor Author

yunikkk commented Feb 27, 2018

@artem-zinnatullin damn it=\

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants