Type mismatch in Save-WebFile.ps1
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- tooling
Hướng nghiên cứu
The errors come from Save-WebFile.ps1 around lines 145 and 165, where $localExists and the (Get-Item $DestinationFullName).Length comparison are evaluated against a value that PowerShell sees as a String[]. Trace where $localExists and the remote size are assigned, and find why one side becomes an array. Done when re-running Update-OSDCloud -DriverPack Microsoft (or Save-WebFile on a URL whose destination file already exists) finishes without InvalidOperation errors and still skips or replaces the file correctly.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Downloading driver packs whether for WinPE or offline USB produces the error:
InvalidOperation: C:\Program Files\PowerShell\Modules\OSD\25.10.22.2\Public\Functions\Other\Save-WebFile.ps1:145
Line |
145 | $localExists `
| ~~~~~~~~~~~~~~
| Could not compare "978731008" to "978731008". Error: "Cannot convert the "System.String[]" value of type
| "System.String[]" to type "System.Int64"."
InvalidOperation: C:\Program Files\PowerShell\Modules\OSD\25.10.22.2\Public\Functions\Other\Save-WebFile.ps1:165
Line |
165 | … if ($localExists -and ((Get-Item $DestinationFullName).Length …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Could not compare "978731008" to "978731008". Error: "Cannot convert the "System.String[]" value of type
| "System.String[]" to type "System.Int64"."
It appears that the driver packs were downloaded successfully despite the error above.
To Reproduce
Update-OSDCloud -DriverPack Microsoft
Expected behavior
No errors are produced
Screenshots
N/A
Desktop (please complete the following information):
- OS: Windows 11 24H2
- Browser [e.g. chrome, safari]
- Ngôn ngữ chính
- PowerShell
- Star
- 251
- Fork
- 102
- Merge trung bình
- 2 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OSDeploy/OSD
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Issue tương tự
-
S3: friction & debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
MedakaLang/medaka#5010 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status: ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
melodic-software/claude-code-plugins#14389 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Recording drops clicks on links, filters and checkboxes that share a form with a search fieldCó thể đã có người làm @columbia11 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Tencent/BrowserSkill#657 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:ci good first issue priority:p2 type:test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NEARBuilders/citynode.app#512 ·
Maintainer thường phản hồi trong vòng 1 ngày