Winget runasuser task cannot work correctly with the image Win11+optimized OS
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- powershell
- Lĩnh vực
- operating-systems
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện chuỗi setupTasks trên image Windows 11+ Optimizations 23H2, tập trung vào các tác vụ winget có bật runAsUser. Kiểm tra C:\devboxcustomizations\runAsUser.ps1 và lệnh gọi Repair-WinGetPackageManager, sau đó so sánh chúng với quá trình sửa chữa thủ công đã thành công. Được coi là hoàn tất khi các tác vụ winget với runAsUser cài đặt VSCode và Python trong quá trình provisioning.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
If we created the dev pool with the image Windows 11+ Optimizations 23H2, then upload the yaml below,
After the dev box is provisioned, VSCode and Python are not installed.
Note: we also used Windows 11 + VS2022 (including PowerShell7), VSCode and Python are installed.
To Reproduce
Steps to reproduce the behavior:
- Create the dev box pool using the image
- Create the dev box in the dev portal, using the customization file below:
`
setupTasks:
- task: powershell
inputs:
command: |
"New-Item -Type Directory -Path 'c:\' -Name qt-custom" - task: winget
inputs:
package: Microsoft.VisualStudioCode
runAsUser: true - task: winget
inputs:
package: Python.Python.3.11
runAsUser: true - task: winget
inputs:
package: Amazon.AWSCLI - task: winget
inputs:
package: RubyInstallerTeam.Ruby.3.2 - task: winget
inputs:
package: Oracle.JDK.17 - task: powershell-runas
inputs:
command: '& "$env:LOCALAPPDATA\Programs\Microsoft VS Code\bin\code" --install-extension github.copilot'
runAsUser: true
`
please check the snapshot, the code above is changed by markdown
- Login to dev box, wait for the popped PowerShell windows to execute
Expected behavior
VSCode and Python should be installed.
Screenshots
In the C:\devboxcustomizations, runAsUser.ps1 is as below, it looks ok:
But when execute the command, it give the error
After we manually execute the repair code, it can install VSCode.
So the issue is that when the task schedule launched the PowerShell, even in the script, there is the command Repair-WinGetPackageManager, but it cannot be executed successfully.
Dev Box VM Details (please complete the following information):
- OS version: Windows 11+ Optimizations 23H2
Additional context
by the way, Amazon CLI and JDK are installed because it's executed under system role
- Ngôn ngữ chính
- PowerShell
- Star
- 52
- Fork
- 194
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. 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 microsoft/devcenter-catalog
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
microsoft/devcenter-catalog#116 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
microsoft/devcenter-catalog#114 · 4 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
microsoft/devcenter-catalog#88 · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 38/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Tất cả issue của microsoft/devcenter-catalog
Issue tương tự
-
bot-triaged enhancement module: binaries module: windows release triage triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/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 78/100
smol-machines/smolvm#1489 · 1 bình luận · 1 reaction ·
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 86/100
WayfireWM/wayfire#3148 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Delta overflow errorĐang mởB - bug DS - win32
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rust-windowing/winit#4722 ·
Maintainer thường phản hồi trong vòng 2 ngày