Skip to content

Take care of special consoles #429

@nxtn

Description

@nxtn

Follow-up to #234

System.InvalidOperationException: Cannot read keys when either application does not have a console or when console input has been redirected from a file. Try Console.Read.
at System.Console.ReadKey(Boolean intercept)

System.Console.ReadKey will fail.

https://github.com/kohsuke/winsw/blob/2d1ffbacfad56edb3a9a61d57cdca3d67ff71bcb/src/Core/ServiceWrapper/Main.cs#L924

AttachConsole/FreeConsole will behave differently.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions