Wrong version comparison in Get-MyDellBios.ps1

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

还没有人认领这个 Issue。

评估

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

调研方向

比较逻辑位于 Public/Functions/BIOS/Get-MyDellBios.ps1 中,issue 报告称在不使用 -Force 时 Update-MyDellBios 从不应用更新的 BIOS。请从比较 $GetMyDellBios.DellVersion 与 Get-MyBiosVersion 的 if 条件开始,检查哪个操作数应当是较低的那个。当目录中的更高版本能够在不使用 -Force 的情况下更新 BIOS,并且 -Force 路径仍然正常工作时,即视为完成。

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

描述

Describe the bug
The function "Update-MyDellBios" will never update an bios if "-Force" is not set.
The reason is a wrong version comparison where the Dell Catalog Version needs to be lower than the systems current bios version.
if (($GetMyDellBios.DellVersion -lt (Get-MyBiosVersion)) -or ($Force.IsPresent) ) { ... }

Affected Script:
Public/Functions/BIOS/Get-MyDellBios.ps1

To Reproduce
Add "Update-MyDellBios" as shutdown script without -force parameter.

Expected behavior
The bios will be updated from a lower to a higher version without the -force parameter

Recommended solution:
if ( ((Get-MyBiosVersion) -lt $GetMyDellBios.DellVersion) -or ($Force.IsPresent) ) { ... }

主要语言
PowerShell
星标
251
派生
102
平均合并
2 分钟
30 天内合并 PR
4

环境准备

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

从这里开始

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

OSDeploy/OSD 的其他 Issue

查看 OSDeploy/OSD 的全部 Issue

相似的 Issue

更多 DevOps Issue

把新 issue 发到你的邮箱

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