Repository navigation
[Bug] Windows: dsh web spams "whoami: extra operand '/user'" errors due to PATH conflict #12553
XiaoBaiXBS
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
When running
npx @deepseek-ai/dsh webon Windows, the terminal is flooded with repeated errors:This error appears to be caused by
dshinvokingwhoami /uservia relative PATH lookup. On Windows systems with Git for Windows / MSYS2 / Cygwin installed, a GNUwhoamibinary shadows the nativewhoami.exe, and the GNU version does not accept the/userflag. The error repeats continuously, likely each timedshattempts to refresh the model listing or process a request.Environment
npx @deepseek-ai/dsh webSteps to Reproduce
usr/bindirectory is prepended to PATH.npx @deepseek-ai/dsh webExpected Behavior
dshshould resolve the current user's SID without errors. It should either:whoami.exe(e.g.,%SystemRoot%\System32\whoami.exe), oros.userInfo()) instead of shelling out towhoami.Actual Behavior
The command
whoami /useris interpreted by the GNUwhoamifrom Git Bash, producing the errorextra operand '/user'. The error repeats indefinitely and clutters the terminal, making it hard to read other logs.Log Snippet
Suggested Fix
whoamiwith a Node.js API (e.g.,os.userInfo().usernameor a native module for SID retrieval).whoami.exevia its absolute path:process.env.SystemRoot + '\\System32\\whoami.exe'.Additional Context
This issue does not prevent the web service from starting (the URL is printed and accessible), but the log spam is a significant UX problem. The root cause is a PATH conflict on Windows, which is a common environment for developers. A fix would improve the experience for all Windows users who use Git Bash.
All reactions