Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Lack of error handling when no setup.exe sub-processes exist causes DSC to interpret completion as failure

未关闭 适合新手
#45 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
86/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
powershell
领域
devops

调研方向

从 Microsoft.VisualStudio.DSC/Microsoft.VisualStudio.DSC.psm1 的第 297 行附近开始,这里调用了 Get-Process Setup。在没有 Setup 子进程的情况下重现 DSCv3 完成路径,并检查命令错误是如何被捕获的。当不存在匹配的进程时将 Setup 完成视为成功,同时仍能检测到真正的子进程失败,即表示完成。

由索引模型根据 Issue 内容生成。

描述

When using Microsoft.VisualStudio.DSC/VSComponents in DSCv3, the DSC shows failure after setup completion at https://github.com/microsoft/VisualStudioDSC/blob/6ae0076f62eab2118c3c74fdf96d6db78dbe913b/Microsoft.VisualStudio.DSC/Microsoft.VisualStudio.DSC.psm1#L297 because Get-Process Setup cmdlet throws when it does not find any matching processes. Based on the rest of the function, $activeInstallerProcess is treated as optional because there is a truthy check before looping through to find any exit codes that are considered failures from the setup sub-processes, so it seems like Get-Process should be invoked with -ErrorAction SilentlyContinue or similar.

Failure in DSC console log:

[4954:0001][2026-09-29T15:13:09] ManifestVerifier Result: Success
[4954:0001][2026-09-29T15:13:09] ManifestVerifier Result: Success
2026-09-29T22:13:09.866178Z ERROR PID 8476: Cannot find a process with the name "Setup". Verify the process name and call the cmdlet again.
2026-09-29T22:13:10.324626Z ERROR PID 8476: Errors were captured during script execution. Check previous error traces for details.
2026-09-29T22:13:10.365420Z ERROR Failed to run process 'pwsh': Command: Resource 'pwsh' [exit code 1]
2026-09-29T22:13:10.367696Z ERROR Error: Command: Resource 'pwsh' [exit code 1]

When running an equivalent command directly through setup.exe in the VS Installer, it succeeds without issue.

主要语言
PowerShell
星标
16
派生
6
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/VisualStudioDSC 的其他 Issue

查看 microsoft/VisualStudioDSC 的全部 Issue

相似的 Issue

更多 DevOps Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。