[bug-bash] edit and theme failures silently return exit 1 without a machine-readable stderr error
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 62/100
Direzione di ricerca
Start by tracing how command failures reach stderr and how --output json, --quiet, and -c affect error handling; compare the failing theme use, theme validate, and edit commands with the working not-a-real-command case. Run the PowerShell reproductions in the issue and capture stdout, stderr, and exit codes. Done when these failures emit explanatory structured JSON to stderr while retaining a nonzero exit code.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
Windows x64, CosmosDBShell 1.1.291-preview (db49321323).
No Cosmos DB connection or credentials are required.
Repro (PowerShell)
$package = "$env:USERPROFILE\.dotnet\tools\.store\cosmosdbshell\1.1.291-preview"
$shell = Join-Path $package 'cosmosdbshell.win-x64\1.1.291-preview\tools\net10.0\win-x64\CosmosDBShell.exe'
& $shell --version
$work = Join-Path ([IO.Path]::GetTempPath()) ("cosmos-errors-" + [guid]::NewGuid().ToString("N"))
New-Item -ItemType Directory -Path $work | Out-Null
Set-Location $work
& $shell --output json -c 'theme use missing-bug-bash-theme'
"Exit code: $LASTEXITCODE"
Actual:
- Exit code: 1
- stdout: empty
- stderr: empty
The same silent failure reproduces with:
& $shell --output json -c 'theme validate .\missing-theme.toml'
Exact headless edit reproduction, including input redirection and output capture:
'bug-bash sample' | Set-Content -Encoding utf8 .\sample.txt
'' | & $shell --output json -c 'edit sample.txt' 1> .\edit.stdout.txt 2> .\edit.stderr.txt
$editExit = $LASTEXITCODE
[pscustomobject]@{
ExitCode = $editExit
StdoutBytes = (Get-Item .\edit.stdout.txt).Length
StderrBytes = (Get-Item .\edit.stderr.txt).Length
}
Actual: ExitCode 1, StdoutBytes 0, StderrBytes 0. Interactive external editing
should be rejected with an explanation in this context, not fail silently.
The same edit result was also observed with --quiet and default -c mode.
Expected
Failures in machine mode emit an explanatory structured JSON error object to
stderr, consistent with the documented automation contract and other commands.
The existing exit code can remain nonzero.
For example:
{"status":"error","error":"Unknown theme ..."}
Working control
& $shell --output json -c 'not-a-real-command'
This correctly returns exit code 2 and a structured stderr error:
{"status":"error","error":"'not-a-real-command' is not recognized ..."}
cat with a missing file, filter with a missing expression, and invalid ftab
formats also emit structured diagnostics; the silence is not a harness-wide
capture problem.
Impact
Automation can detect failure but cannot explain it, surface remediation, or
collect useful bug reports. Empty stderr also makes rejected interactive editing
indistinguishable from an unexplained internal failure.
Validation
Reproduced with direct child-process execution, captured stdout and stderr,
and closed/redirected stdin. The edit failure reproduces with --output json,
--quiet, and default -c machine mode. Both invalid theme operations reproduce
without a database connection.
- Lingua principale
- C#
- Stelle
- 4
- Fork
- 7
- Merge medio
- 1g 23h
- PR unite (30g)
- 23
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Azure/CosmosDBShell
-
[bug-bash] print maps a missing item's HTTP 404 to exit 1 instead of documented not-found exit 5Forse già presa @mkrueger l’ha presa 1 giorno fa. Apertabug bug-bash
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Azure/CosmosDBShell#279 ·
I maintainer di solito rispondono entro 1 giorno
-
[bug-bash] Sequential script commands leak their result into rm as implicit pipe inputForse già presa @mkrueger l’ha presa oggi. Apertabug bug-bash
Difficoltà 3/5 1-2 giorni Idoneità per principianti 75/100
Azure/CosmosDBShell#281 ·
I maintainer di solito rispondono entro 1 giorno
-
[bug-bash] Invalid command arguments return general-failure exit 1 instead of documented usage exit 2Forse già presa @mkrueger l’ha presa 1 giorno fa. Apertabug bug-bash
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
Azure/CosmosDBShell#280 ·
I maintainer di solito rispondono entro 1 giorno
-
[bug-bash] Multi-statement -c and piped stdin silently drop intermediate output and file redirectionsForse già presa @mkrueger l’ha presa 1 giorno fa. Apertabug bug-bash
Difficoltà 3/5 1-2 giorni Idoneità per principianti 75/100
Azure/CosmosDBShell#277 ·
I maintainer di solito rispondono entro 1 giorno
-
Connection to mcp failed?Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Azure/CosmosDBShell#274 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Azure/CosmosDBShell
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
Unity-Technologies/unity-agent-plugin#118 ·
I maintainer di solito rispondono entro 1 giorno
-
The Recommended preset turns on Import Uno DSP, which only works with the Material themeForse già presa @agneszitte l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
unoplatform/uno.templates#2388 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
eyalgolan/statecraft-israel#2732 ·
I maintainer di solito rispondono entro 1 giorno
-
変換の候補のどれが Zenzai の答えか分からないAperta要トリアージ
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
kind/chore status/draft
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Altinn/altinn-events#1158 ·
I maintainer di solito rispondono entro 1 giorno