PowerShell: "The variable '$elapsed' cannot be retrieved because it has not been set."
@theJasonHelmick đang làm issue này rồi.
Từ ngày 9/3/2023.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
When I now log in to Azure Cloud Shell using PowerShell I get this error:
InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:268
Line |
268 | if($elapsed -gt '1000')
| ~~~~~~~~
| The variable '$elapsed' cannot be retrieved because it has not been set.
here's what is happening:

The profile file /opt/microsoft/powershell/7/profile.ps1 is part of the Azure Cloud Shell.
I have Set-StrictMode -Version latest in my PowerShell profile. If I remove this the error goes away.
I think the default for Azure Cloud Shell PowerShell should use strict mode to catch unnecessary issues.
- Ngôn ngữ chính
- PowerShell
- Star
- 273
- Fork
- 116
- 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
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 Azure/CloudShell
-
bug Triage-needed
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
Azure/CloudShell#655 ·
-
Blood TestĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 5/100
Azure/CloudShell#654 · 2 bình luận ·
-
bug Triage-needed
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
Azure/CloudShell#653 ·
-
bug Triage-needed
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
Azure/CloudShell#649 · 2 bình luận ·
-
[BUG] Bash session falls back to ephemeral (“Failed to mount the Azure file share”) after $HOME image is attached; intermittent across 5 file shares, 3 storage accounts, 2 subscriptionsCó thể đã có người làm @priyaananthasankar đã nhận 22 ngày trước. Đang mởbug
Azure/CloudShell#648 · 1 bình luận · 1 người được giao ·