Skip to content

If powershell.version is present but empty, $PSVersionTable.GitCommitId reports "Index was outside the bounds of the array" #3676

Closed

Description

Steps to reproduce

clear the contents of powershell.version

PS> $PSVersionTable.GitCommitId

Expected behavior

unknown

Actual behavior

Index was outside the bounds of the array.

Environment data


Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    Index was outside the bounds of the array.
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Activity

  1. added
    Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributors
    on May 1, 2017
  2. SteveL-MSFT commented on May 1, 2017

    @SteveL-MSFT
    Member

    The fix should also handle the case if the file is missing, putting the exception message as the GitCommitId value doesn't seem like the right solution

  3. lzybkr commented on May 1, 2017

    @lzybkr
    Contributor

    The fix should generate a C# file at build time so that we don't need a file at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Maintainers-Buildspecific to affecting the build

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions