-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve check for developer mode by checking minimum required build number #8749
Improve check for developer mode by checking minimum required build number #8749
Conversation
…umber The test would fail if the developer mode is enabled but the machine has an older build than the minimum required build. The change adds a check for the build version in the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't blocking, but it might be easier to read/maintain
test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1
Outdated
Show resolved
Hide resolved
…em.Tests.ps1 Co-Authored-By: adityapatwardhan <adityap@microsoft.com>
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
Better performance
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
Fix spacing around `,`
merging this because it is blocking PRs. |
@adityapatwardhan I'm a bit late to the party here, but I noticed that we are depending a manifest in the binary for OSVersion to give correct results. This doesn't seem to happen when we run the tests, as they are loaded into the dotnet.exe binary. I get version 6.2 on my windows 10 machine when running the tests. |
@powercode Windows API, by default, will return 6.2 for the Windows Version. For Windows PowerShell and PowerShell Core, we rely on a compatibility section in the app manifest to have it return 10. If you're referring to unit tests running in dotnet.exe, it may be ok to expect 6.2 as long as it's understood. |
@SteveL-MSFT It's just annoying when the tests don't behave as the product. |
PR Summary
The test would fail if the developer mode is enabled but the machine has an older build than the minimum required build.
The change adds a check for the build version in the test.
PR Context
The current is causing CI failures.
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.[feature]
to your commit messages if the change is significant or affects feature tests