[release/v7.5.12] Tolerate IO/JSON errors reading the per-user `power… · PowerShell/PowerShell@8a32d84 · GitHub
Skip to content

Commit 8a32d84

Browse files
[release/v7.5.12] Tolerate IO/JSON errors reading the per-user powershell.config.json (#28070)
1 parent b1b1159 commit 8a32d84

3 files changed

Lines changed: 176 additions & 4 deletions

File tree

‎src/System.Management.Automation/engine/PSConfiguration.cs‎

Lines changed: 54 additions & 1 deletion

‎src/System.Management.Automation/resources/PSConfigurationStrings.resx‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,10 @@
120120
<data name="CanNotConfigurationFile" xml:space="preserve">
121121
<value>PowerShell has stopped working because of a security issue: Cannot read the configuration file: {0}</value>
122122
</data>
123+
<data name="CanNotReadConfigurationFile" xml:space="preserve">
124+
<value>Cannot read the PowerShell configuration file '{0}': {1}. Falling back to default settings.</value>
125+
</data>
126+
<data name="CanNotReadConfigurationValue" xml:space="preserve">
127+
<value>Cannot read setting '{0}' from PowerShell configuration file '{1}': {2}. Falling back to default for this setting.</value>
128+
</data>
123129
</root>

‎test/xUnit/csharp/test_PSConfiguration.cs‎

Lines changed: 116 additions & 3 deletions

0 commit comments

Comments
 (0)