Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

fix issue with double output on windows #458

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions input.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@ func (i *Input) Prompt(config *PromptConfig) (interface{}, error) {

lineStr := i.answer

i.AppendRenderedText(lineStr)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This code gets called on all platforms and its implementation doesn't differ between platforms. Do you know how it could have caused problems only on Windows but not elsewhere?

Copy link
Author

Choose a reason for hiding this comment

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

I am not entirely sure what happens on windows to cause this problem, I can try and dig deeper but my only guess right now has to do with the carriage return, as it seems to render the same text twice and this was to remove the second one, which is probably totally wrong. I did do testing on Ubuntu as well and found there was no difference in outputs of my test between before and after my change. Obviously I could be missing some manual test cases so if there are more I can do let me know.


// we're done
return lineStr, err
}
Expand Down