Skip to content

Add null check for Windows PowerShell install path - #12296

Merged
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
PaulHigin:fix-startjob-nowinpwsh
Apr 14, 2020
Merged

Add null check for Windows PowerShell install path#12296
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
PaulHigin:fix-startjob-nowinpwsh

Conversation

@PaulHigin

Copy link
Copy Markdown
Contributor

PR Summary

This PR fixes a bug where a null reference exception is thrown during Start-Job, if default Windows PowerShell default shell Id is not in the registry.

PR Context

Some Azure images have run into this problem where Start-Job fails even when running in pwsh child process rather than Windows PowerShell child. Fix is to guard against the missing registry entry.

PR Checklist

@ghost ghost assigned Ilya (iSazonov) Apr 10, 2020
@PaulHigin Paul Higinbotham (PaulHigin) added WG-Remoting PSRP issues with any transport layer Issue-Bug Issue has been identified as a bug in the product labels Apr 10, 2020
@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Apr 11, 2020
@iSazonov

Copy link
Copy Markdown
Collaborator

Oh, when do we start doing null annotations? Up to 80% of .Net Runtime code is already annotated and we can benefit from this.

@ghost

Copy link
Copy Markdown

🎉v7.1.0-preview.2 has been released which incorporates this pull request.:tada:

Handy links:

@ghost

Copy link
Copy Markdown

🎉v7.0.1 has been released which incorporates this pull request.:tada:

Handy links:

John Dennis (silijon) pushed a commit to SkyKick/PowerShell that referenced this pull request Jul 2, 2020
Some Azure images have run into this problem where Start-Job fails even when running in pwsh child process rather than Windows PowerShell child. Fix is to guard against the missing registry entry.
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
Some Azure images have run into this problem where Start-Job fails even when running in pwsh child process rather than Windows PowerShell child. Fix is to guard against the missing registry entry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log Issue-Bug Issue has been identified as a bug in the product WG-Remoting PSRP issues with any transport layer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants