Skip to content

Studio CLI prints chcp is not recognized on Windows when run from PowerShell (non-admin); output is noisy even for studio --version #3520

Description

@annachurasheva

Environment

  • OS: Windows 11 Pro, build 10.0.26220.8340
  • Studio CLI: 1.9.0
  • Running as: standard user (non-admin)
  • Shell: PowerShell 5+ (Windows built-in)
  • Site path: C:\Users\annac\Studio\m2026

Problem
Running studio --version from PowerShell prints repeated errors about chcp not being recognized, even though the command should only output the version.

Repro steps

  1. Open PowerShell as a normal (non-admin) user.
  2. Run:
    studio --version

Actual output
"chcp" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
"chcp" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
1.9.0
"chcp" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.

Expected output
1.9.0
(no extra output on stdout/stderr)

Notes

  • chcp exists at C:\Windows\System32\chcp.com
  • PATHEXT in PowerShell:
    .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
  • Running from elevated cmd.exe (Admin) is clean:
    studio --version
    -> 1.9.0

Impact
This noisy output breaks scripting/automation and any tooling that expects clean CLI output (e.g. parsing JSON from related commands).
Please ensure Studio CLI either:

  • doesn’t attempt to run chcp in PowerShell, or
  • executes it via cmd.exe /c chcp ..., or
  • detects shell/availability and avoids printing errors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions