This repository has been archived by the owner on Dec 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Run command as is in Windows even with unbuffered mode. #14
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arturdryomov
suggested changes
Feb 25, 2018
@@ -50,15 +50,15 @@ fun process( | |||
|
|||
val command: List<String> |
There was a problem hiding this comment.
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
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, sure
true -> command = when (os()) { | ||
command = when (unbufferedOutput) { | ||
false -> commandAndArgs | ||
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. |
There was a problem hiding this comment.
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
force-pushed
the
dont-buffer-on-windows
branch
from
February 25, 2018 17:48
7d9a577
to
d6b1b5c
Compare
arturdryomov
approved these changes
Feb 25, 2018
👍 |
@yunikkk your git config is broken as usual lol, fix email! |
@artem-zinnatullin damn it=\ |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continuation of #4 .