Repository navigation
Conversation
Reviewer's GuideImplementationSeparate MediaMTX cache preparation from copying, adding all-RID downloads, output selection, progress reporting, and generated SHA-256 validation.
Parse the expanded CLI options and route default, download, copy, and all-RID operations to the installer.
ConfigurationUpdate CLI package metadata and target framework configuration for the standalone tool release.
DocumentationDocument installation, the expanded download and copy workflow, cache behavior, deployment examples, and runtime requirements.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Linked issuesChecked at commit 3773e5e #1374 feat(MediaMtx.Cli): add standalone tool deployment CLI · 7 of 9 met
|
There was a problem hiding this comment.
Hey - I've found 4 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="tools/BootstrapBlazor.MediaMtx.Cli/Program.cs" line_range="115" />
<code_context>
{
- await Console.Error.WriteLineAsync("MediaMTX deployment was canceled or timed out.");
- return 130;
+ await Console.Out.WriteLineAsync("[MediaMTX] Warning - deployment was canceled or timed out.", CancellationToken.None);
}
-catch (Exception exception) when (exception is ArgumentException or InvalidOperationException or
</code_context>
<issue_to_address>
**Failed deployments report success**
When a build or publish invokes the CLI and parsing, downloading, cache validation, copying, or cancellation fails, `Program` catches cancellation and every other exception, prints a warning, and exits normally with status 0; build or publish automation therefore reports success even when parsing, downloading, cache validation, or copying failed and the output is missing MediaMTX files.
Return a nonzero exit status for failed operations, or make success-on-failure an explicit opt-in that host automation can handle deliberately.
Also at `tools/BootstrapBlazor.MediaMtx.Cli/Program.cs:117-120`.
</issue_to_address>
### Comment 2
<location path="tools/BootstrapBlazor.MediaMtx.Cli/Program.cs" line_range="115" />
<code_context>
{
- await Console.Error.WriteLineAsync("MediaMTX deployment was canceled or timed out.");
- return 130;
+ await Console.Out.WriteLineAsync("[MediaMTX] Warning - deployment was canceled or timed out.", CancellationToken.None);
}
-catch (Exception exception) when (exception is ArgumentException or InvalidOperationException or
</code_context>
<issue_to_address>
**Failed copies report success**
When a forced copy is interrupted or encounters an I/O error after replacing one output file but before replacing the other, `CopyToolsAsync` can replace the executable and then fail before replacing the license; `Program` catches the exception and returns success, and a later non-forced copy skips because both files exist, leaving a mixed deployment in place.
Commit the executable and license as one recoverable deployment, or ensure failed copies are reported as failures and subsequent copies detect and repair an incomplete pair.
</issue_to_address>
### Comment 3
<location path="tools/BootstrapBlazor.MediaMtx.Cli/Program.cs" line_range="101" />
<code_context>
+ {
+ throw new ArgumentException("Option '--force' requires copying; use it with '--copy'.");
+ }
+ var defaultAction = !download && !copy;
+ if (download && rid == "all")
+ {
</code_context>
<issue_to_address>
**Deployment succeeds without MediaMTX**
When the default action runs with an empty cache, `defaultAction` calls `MediaMtxInstaller.DeployAsync` with `download` false, so cache validation fails and the CLI reports a warning while exiting successfully; the documented deployment finishes without MediaMTX files.
Make the default action download the required files before copying them, or otherwise ensure a missing cache causes deployment to fail rather than report success.
Also at `tools/BootstrapBlazor.MediaMtx.Cli/Program.cs:109-110`.
</issue_to_address>
### Comment 4
<location path="tools/BootstrapBlazor.MediaMtx.Cli/readme.md" line_range="5" />
<code_context>
+独立的 .NET CLI 工具,用于下载、校验和缓存 [MediaMTX](https://github.com/bluenviron/mediamtx/releases),并将可执行文件和许可证复制到应用目录。工具包不包含 MediaMTX 二进制文件;`BootstrapBlazor.MediaMtx` 主包也不会自动安装 CLI 或下载 MediaMTX。
-## 使用
+CLI 目标为 .NET 11:安装工具需要 .NET SDK,运行需要 .NET 11 运行时。若只有更高主版本的运行时,需另行启用运行时 roll-forward。
-```powershell
</code_context>
<issue_to_address>
**Target .NET 8**
The issue asks for a .NET 8 tool, but the README states that this CLI targets .NET 11. Update the target framework to the requested version and keep the runtime guidance consistent.
</issue_to_address>| { | ||
| await Console.Error.WriteLineAsync("MediaMTX deployment was canceled or timed out."); | ||
| return 130; | ||
| await Console.Out.WriteLineAsync("[MediaMTX] Warning - deployment was canceled or timed out.", CancellationToken.None); |
There was a problem hiding this comment.
🟡 Medium · Failed deployments report success
When a build or publish invokes the CLI and parsing, downloading, cache validation, copying, or cancellation fails, Program catches cancellation and every other exception, prints a warning, and exits normally with status 0; build or publish automation therefore reports success even when parsing, downloading, cache validation, or copying failed and the output is missing MediaMTX files.
Return a nonzero exit status for failed operations, or make success-on-failure an explicit opt-in that host automation can handle deliberately.
Also at tools/BootstrapBlazor.MediaMtx.Cli/Program.cs:117-120.
Prompt for AI agents
In `tools/BootstrapBlazor.MediaMtx.Cli/Program.cs` at line 115:
**Failed deployments report success**
When a build or publish invokes the CLI and parsing, downloading, cache validation, copying, or cancellation fails, `Program` catches cancellation and every other exception, prints a warning, and exits normally with status 0; build or publish automation therefore reports success even when parsing, downloading, cache validation, or copying failed and the output is missing MediaMTX files.
Return a nonzero exit status for failed operations, or make success-on-failure an explicit opt-in that host automation can handle deliberately.
Also at `tools/BootstrapBlazor.MediaMtx.Cli/Program.cs:117-120`.| { | ||
| await Console.Error.WriteLineAsync("MediaMTX deployment was canceled or timed out."); | ||
| return 130; | ||
| await Console.Out.WriteLineAsync("[MediaMTX] Warning - deployment was canceled or timed out.", CancellationToken.None); |
There was a problem hiding this comment.
🟡 Medium · Failed copies report success
When a forced copy is interrupted or encounters an I/O error after replacing one output file but before replacing the other, CopyToolsAsync can replace the executable and then fail before replacing the license; Program catches the exception and returns success, and a later non-forced copy skips because both files exist, leaving a mixed deployment in place.
Commit the executable and license as one recoverable deployment, or ensure failed copies are reported as failures and subsequent copies detect and repair an incomplete pair.
Prompt for AI agents
In `tools/BootstrapBlazor.MediaMtx.Cli/Program.cs` at line 115:
**Failed copies report success**
When a forced copy is interrupted or encounters an I/O error after replacing one output file but before replacing the other, `CopyToolsAsync` can replace the executable and then fail before replacing the license; `Program` catches the exception and returns success, and a later non-forced copy skips because both files exist, leaving a mixed deployment in place.
Commit the executable and license as one recoverable deployment, or ensure failed copies are reported as failures and subsequent copies detect and repair an incomplete pair.| { | ||
| throw new ArgumentException("Option '--force' requires copying; use it with '--copy'."); | ||
| } | ||
| var defaultAction = !download && !copy; |
There was a problem hiding this comment.
🟠 High · Deployment succeeds without MediaMTX
When the default action runs with an empty cache, defaultAction calls MediaMtxInstaller.DeployAsync with download false, so cache validation fails and the CLI reports a warning while exiting successfully; the documented deployment finishes without MediaMTX files.
Make the default action download the required files before copying them, or otherwise ensure a missing cache causes deployment to fail rather than report success.
Also at tools/BootstrapBlazor.MediaMtx.Cli/Program.cs:109-110.
Prompt for AI agents
In `tools/BootstrapBlazor.MediaMtx.Cli/Program.cs` at line 101:
**Deployment succeeds without MediaMTX**
When the default action runs with an empty cache, `defaultAction` calls `MediaMtxInstaller.DeployAsync` with `download` false, so cache validation fails and the CLI reports a warning while exiting successfully; the documented deployment finishes without MediaMTX files.
Make the default action download the required files before copying them, or otherwise ensure a missing cache causes deployment to fail rather than report success.
Also at `tools/BootstrapBlazor.MediaMtx.Cli/Program.cs:109-110`.From #1374:
Deploy MediaMTX 1.21.4 under `mediamtx-tools/<RID>` in the current directory, automatically detecting the platform or accepting `--rid`.| 独立的 .NET CLI 工具,用于下载、校验和缓存 [MediaMTX](https://github.com/bluenviron/mediamtx/releases),并将可执行文件和许可证复制到应用目录。工具包不包含 MediaMTX 二进制文件;`BootstrapBlazor.MediaMtx` 主包也不会自动安装 CLI 或下载 MediaMTX。 | ||
|
|
||
| ## 使用 | ||
| CLI 目标为 .NET 11:安装工具需要 .NET SDK,运行需要 .NET 11 运行时。若只有更高主版本的运行时,需另行启用运行时 roll-forward。 |
There was a problem hiding this comment.
🟠 High · Target .NET 8
The issue asks for a .NET 8 tool, but the README states that this CLI targets .NET 11. Update the target framework to the requested version and keep the runtime guidance consistent.
Prompt for AI agents
In `tools/BootstrapBlazor.MediaMtx.Cli/readme.md` at line 5:
**Target .NET 8**
The issue asks for a .NET 8 tool, but the README states that this CLI targets .NET 11. Update the target framework to the requested version and keep the runtime guidance consistent.From #1374:
Target .NET 8.
Link issues
fixes #1374
Summary By Copilot
BootstrapBlazor.MediaMtx.Clito11.0.2and align project metadata and target framework configuration.--downloadand--copyoperations, with support for--output, selected RID copy behavior, and preparing all supported RIDs.--forceoverwrites output files without forcing a cache download.Regression?
This changes the opt-in standalone CLI workflow without changing existing component or service implementations.
Risk
The change adds download, cache, and file-copy behavior to a standalone tool.
--forcecan overwrite output executable and license files by design; cache and output paths can be influenced by CLI options.Verification
This Issue/PR creation task performed read-only Git and GitHub checks only. The working tree is clean, local
HEADmatchesorigin/chore-cli, and no open PR exists for headchore-cliagainstmaster. The branch does not contain the latestmastercommit546de59band should be updated before merge.No build, pack, test, or manual CLI verification was run.
Packaging changes reviewed?
The CLI package metadata and README inclusion were reviewed in the package project; MediaMTX binaries remain deployment-time downloads and are not bundled in the NuGet tool package.
☑️ Self Check before Merge
Summary by Sourcery
Expand the standalone MediaMTX CLI workflow to support downloading, caching, and copying tools independently.
New Features:
Enhancements:
Build:
Documentation: