Skip to content
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

Change ‘WINDIR’ to ‘SYSTEMROOT’ #497

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated build to use `Sampler.GitHubTasks` - Fixes [Issue #489](https://github.com/dsccommunity/NetworkingDsc/issues/489).
- Added support for publishing code coverage to `CodeCov.io` and
Azure Pipelines - Fixes [Issue #491](https://github.com/dsccommunity/NetworkingDsc/issues/491).
- Minor change to environment variable lookup.

## [8.2.0] - 2020-10-16

Expand Down
2 changes: 1 addition & 1 deletion source/DSCResources/DSC_HostsFile/DSC_HostsFile.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function Get-HostEntry
$HostName
)

$hostPath = "$env:windir\System32\drivers\etc\hosts"
$hostPath = "$env:SystemRoot\System32\drivers\etc\hosts"

$allHosts = Get-Content -Path $hostPath | Where-Object -FilterScript {
[System.String]::IsNullOrEmpty($_) -eq $false -and $_.StartsWith('#') -eq $false
Expand Down