You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Corrupted PowerShellProperties.json prevents powershell from starting #2342
C:\Users\sevoroby>F:\dev\PowerShell/src/powershell-win-core\bin\Debug\netcoreapp1.0\win10-x64\powershell.exe
PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
The shell cannot be started. A failure occurred during initialization:
Error reading JToken from JsonReader. Path '', line 0, position 0.
C:\Users\sevoroby>
PowerShell cannot run.
Removing the file fixes the problem.
I propose to handle this error gracefully: if file is corrupted, we should re-create it, like it was not present at all.
Activity
vors commentedon Sep 22, 2016
cc Mike Richmond (@mirichmo)
mirichmo commentedon Sep 22, 2016
This request is similar to #1614 (add Schema validation to the JSON file), but addresses a different aspect of file validation
mirichmo commentedon Sep 27, 2016
The simplest repro is to empty the config file:
and then restart PowerShell. Give it invalid contents to trigger the scenario specified here.