Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kurukuru display invalid output when using pipe #2

Open
wk-j opened this issue Dec 17, 2017 · 2 comments
Open

Kurukuru display invalid output when using pipe #2

wk-j opened this issue Dec 17, 2017 · 2 comments

Comments

@wk-j
Copy link

wk-j commented Dec 17, 2017

 class Program
    {
        static void Spin(string line)
        {
            Spinner.Start(line, spinner =>
            {
                spinner.Text = "Stage 2... ";
                Thread.Sleep(200);
                spinner.Fail("Something went wrong!");
            });
        }
        static void Main(string[] args)
        {
            string line;
            while ((line = Console.ReadLine()) != null)
            {
                Spin(line);
            }
        }
}

Pipe input

echo hello | mono src/KurukuruPipe/bin/Debug/net47/KurukuruPipe.exe

Result

⠋ Stage 2... ⠙ Stage 2... ⠹ Stage 2... ✖ Something went wrong!
@mayuki
Copy link
Owner

mayuki commented Dec 18, 2017

Hi, I tried to reproduce on Linux (Ubuntu 16.04) and Mono 5.4.1.6. But I couldn't reproduce it.
What versions of Mono and OS are you running?

$ mono -V | head -1
Mono JIT compiler version 5.4.1.6 (tarball Wed Nov  8 20:37:08 UTC 2017)

$ cat /etc/os-release | head -2
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"

$ mono ConsoleApp1.exe | more
Hello World!
✔ Hoge

@wk-j
Copy link
Author

wk-j commented Dec 18, 2017

I'm using mono 5.4.1.6 on Mac OS.
It occur if using input pipe like below

❯ mono /Users/wk/Source/github/KurukuruPipe/src/KurukuruPipe/bin/Debug/net47/KurukuruPIpe.exe | more
✖ Something went wrong!

❯ echo hello | mono /Users/wk/Source/github/KurukuruPipe/src/KurukuruPipe/bin/Debug/net47/KurukuruPIpe.exe
⠋ Stage 2... ⠙ Stage 2... ⠹ Stage 2... ✖ Something went wrong!

❯ mono -V
Mono JIT compiler version 5.4.1.6 (tarball Mon Dec 11 14:59:42 GMT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug
	LLVM:          supported, not enabled.
	GC:            sgen (concurrent by default)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants