Skip to content

[BUG] Interactive verbs (--encrypt-password, --configure-network) give no feedback on a non-interactive console (ISE / remote / redirected stdin) #2097

Closed

Description

@gotqn

Component

Darling

Performance Monitor Version

v3.3.0 and dev

SQL Server Version

n/a

Windows Version

Windows PowerShell ISE; also some VS Code integrated terminals, remote/PSRemoting sessions, or any EOF/redirected stdin.

Describe the Bug

The stdin-reading verbs read EOF immediately in a non-interactive console and effectively do nothing, with no visible guidance - the operator (me) thinks the tool hung or the verb is broken.

Steps to Reproduce

  1. Open PowerShell ISE (or any non-console host).
  2. Run PerformanceMonitor.Darling.Service.exe --encrypt-password.
  3. Type a password + Enter → nothing usable comes back. The Password: prompt and the No password read from stdin. line are written to stderr, which these hosts don't surface - so it reads as a silent no-op.
  4. Same for --configure-network: the wizard's prompts read EOF and it bails.

Expected Behavior

To work.

Actual Behavior

Console.ReadLine() returns null when stdin isn't an interactive console; the only feedback is on stderr, which ISE and some hosts don't display, so it looks like nothing happened.

The very first setup step (encrypting the SQL-auth password) fails silently with no path forward. The workaround exists but isn't discoverable: Read-Host 'x' | PerformanceMonitor.Darling.Service.exe --encrypt-password.

Error Messages / Log Output


Screenshots

No response

Additional Context

Suggested fix: On a null/empty stdin read, emit an actionable message to stdout (a stream every host shows), naming the likely cause and the pipe workaround — e.g.:

No interactive input received. If you're in the PowerShell ISE or a non-interactive/remote shell, pipe the value instead:
Read-Host 'password' | PerformanceMonitor.Darling.Service.exe --encrypt-password

Optionally detect it up front (e.g. Console.IsInputRedirected == false + a null read). Apply to every stdin-reading verb (--encrypt-password, --configure-network, and any others).

Acceptance: Running these verbs in ISE / a non-interactive shell prints a clear, actionable message (to a displayed stream) with the exact pipe command - instead of doing nothing.

Activity

  1. added
    bugSomething isn't working
    on Aug 7, 2026
  2. added a commit that references this issue on Aug 7, 2026
  3. erikdarlingdata commented on Aug 7, 2026

    @erikdarlingdata
    Owner

    Fixed and merged for 3.4.0, essentially as you suggested: both verbs now write the actionable explanation to stdout (cause + the Read-Host … | pipe workaround), and the wizard distinguishes EOF (guidance + exit 1) from an explicit quit (quiet + exit 0). Thanks for the precise diagnosis — stderr invisibility in those hosts was exactly it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions