Sheller icon indicating copy to clipboard operation
Sheller copied to clipboard

Dosen't work on windows

Open flamaniac opened this issue 6 years ago • 9 comments

Tests are failing. "CMD" shell is freezing process.

flamaniac avatar Feb 17 '20 21:02 flamaniac

Interesting. I will take a look.

twitchax avatar Feb 17 '20 23:02 twitchax

Ok, I fixed the Windows tests. I cannot repro issues with Cmd. Do you have a test example that fails?

twitchax avatar Feb 19 '20 05:02 twitchax

I think there is some problem with encoding... Freezing was the repercusion in my WPF application. Dispate what encoding i set when i call "liquidctl status“ https://github.com/jonasmalacofilho/liquidctl

This character returmed to std:io couse problem: ├──

flamaniac avatar Feb 19 '20 07:02 flamaniac

Can you point me to the specific file or line? :)

twitchax avatar Feb 20 '20 07:02 twitchax

It will be hard to reproduce. Try to call "liquidctl status" (i send link before) maybe even without kraken device will return strange utf character. Sample output from this exe:

NZXT Kraken X (X42, X52, X62 or X72) ├── Liquid temperature 28.1 °C ├── Fan speed 851 rpm ├── Pump speed 1953 rpm └── Firmware version 6.0.2
After calling "liquidctl status" manualy from cmd process ends and command prompt is normal (exe is session less - not like VIM for example). In different lib I am getting first line of output and encoding error coused by "├" character (but this looks like ascii...)

I try test Sheller at end of a day

flamaniac avatar Feb 20 '20 08:02 flamaniac

I just want to see the line of code that you are calling. I want to see the parameters, etc.

twitchax avatar Feb 20 '20 22:02 twitchax

var echoResult = await Sheller.Builder .UseShell<Cmd>() .UseStandardOutputEncoding(Encoding.UTF8) .UseStandardErrorEncoding(Encoding.UTF8) .UseExecutable("liquidctl.exe") .WithArgument("status") .ExecuteAsync(); It is reciving first line of output: obraz

flamaniac avatar Feb 20 '20 23:02 flamaniac

I cannot repro a crash, but it seems that using .UseStandardOutputEncoding is not required.

Can you try removing the two output encoding lines? I don't think they are required for those characters.

twitchax avatar Feb 22 '20 05:02 twitchax

Ok. I have confirmed that this is problem of exe that i am calling (in has Python interpreter and Python Script inside. Sorry for bother

flamaniac avatar Feb 24 '20 08:02 flamaniac