PowerShell: "The variable '$elapsed' cannot be retrieved because it has not been set."

オープン
#284 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@theJasonHelmick がすでに取り組んでいます。

2023年3月9日 から。

評価

この issue はまだ評価されていません。

説明

Area-image bug Iteration-Backlog

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:
image

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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/CloudShell のほかの issue

Azure/CloudShell の issue をすべて見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。