Skip to content

--version output goes to stderr instead of stdout #49

@Christophe-Rogiers

Description

@Christophe-Rogiers

When running servy-cli.exe --version, the version string is written to stderr rather than stdout:

servy-cli.exe : Servy.CLI 7.6.0+60664ef2dd081071b983b3b337dc81d7b6ef9795
    + CategoryInfo          : NotSpecified: (Servy.CLI 7.6.0...7b6ef9795:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
This causes issues when capturing the version programmatically in PowerShell:

$version = & servy-cli.exe --version # returns empty — output went to stderr
PowerShell treats any stderr output from native commands as an error record, which produces red error noise in logs even though nothing actually failed.

Expected behavior: --version should write to stdout, consistent with CLI conventions (git --version, dotnet --version, node --version, etc.).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions