mirror of
https://github.com/PowerShell/PSDesiredStateConfiguration
synced 2026-06-21 13:45:25 +00:00
Change ErrorAction to Ignore so that the error doesn't show up in $Error (#93)
This commit is contained in:
@@ -71,7 +71,7 @@ data LocalizedData
|
||||
Set-StrictMode -Off
|
||||
|
||||
# In case localized resource is not available we revert back to English as defined in LocalizedData section so ignore the error instead of showing it to user.
|
||||
Import-LocalizedData -BindingVariable LocalizedData -FileName PSDesiredStateConfiguration.Resource.psd1 -ErrorAction SilentlyContinue
|
||||
Import-LocalizedData -BindingVariable LocalizedData -FileName PSDesiredStateConfiguration.Resource.psd1 -ErrorAction Ignore
|
||||
|
||||
Import-Module $PSScriptRoot/helpers/DscResourceInfo.psm1
|
||||
|
||||
@@ -3481,7 +3481,7 @@ function New-DscChecksum
|
||||
}
|
||||
|
||||
# If the Force parameter was not specified and the hash file already exists for the current file, log this, and skip this file
|
||||
if (!$Force -and (Get-Item -Path $fileOutpath -ErrorAction SilentlyContinue))
|
||||
if (!$Force -and (Get-Item -Path $fileOutpath -ErrorAction Ignore))
|
||||
{
|
||||
Write-Log -Message ($LocalizedData.CheckSumFileExists -f $fileOutpath)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user