Skip to content

GetVersionDetails failing due to empty $env:PROCESSOR_ARCHITECTURE #346

Closed
@rkeithhill

Description

@rkeithhill

Just looking at a log file and noticed this:

1/18/2017 8:12:05 PM [NORMAL] - Method "StartLogging" at line 117 of C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices.Host\EditorServicesHost.cs

    PowerShell Editor Services Host v0.0.0.0 starting (pid 22828)...
    
      Host application details:
    
        Name:      Visual Studio Code Host
        ProfileId: Microsoft.VSCode
        Version:   0.8.0
        Arch:      64-bit
    
      Operating system details:
    
        Version: Microsoft Windows NT 10.0.14393.0
        Arch:    64-bit

1/18/2017 8:12:05 PM [WARNING] - Method "GetVersionDetails" at line 149 of C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices\Session\PowerShellVersionDetails.cs

    Failed to look up PowerShell version, defaulting to version 5.
    
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.PowerShell.EditorServices.PowerShellContext.<>c__47`1.<ExecuteScriptAndGetItem>b__47_0(PSObject pso)
       at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
       at System.Linq.Enumerable.<OfTypeIterator>d__92`1.MoveNext()
       at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
       at Microsoft.PowerShell.EditorServices.PowerShellContext.ExecuteScriptAndGetItem[TResult](String scriptToExecute, Runspace runspace, TResult defaultValue)
       at Microsoft.PowerShell.EditorServices.Session.PowerShellVersionDetails.GetVersionDetails(Runspace runspace)

This on latest bits updated just a little while ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions