PowerShell: "The variable '$elapsed' cannot be retrieved because it has not been set."
@theJasonHelmick がすでに取り組んでいます。
2023年3月9日 から。
評価
この issue はまだ評価されていません。
説明
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.
- 主要言語
- PowerShell
- スター
- 273
- フォーク
- 116
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Azure/CloudShell のほかの issue
-
bug Triage-needed
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
Azure/CloudShell#655 ·
-
Blood Testオープン
難易度 5/5 1週間以上 初心者へのやさしさ 5/100
Azure/CloudShell#654 · コメント 2 件 ·
-
bug Triage-needed
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
Azure/CloudShell#653 ·
-
bug Triage-needed
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
Azure/CloudShell#649 · コメント 2 件 ·
-
[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 subscriptions対応中かも @priyaananthasankar が 21 日前に担当しました。 オープンbug
Azure/CloudShell#648 · コメント 1 件 · 担当者 1 名 ·