mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add retry logic to the operation that updates 'powershell.config.json' (#8779)
This commit is contained in:
@@ -459,7 +459,7 @@ namespace System.Management.Automation.Configuration
|
||||
// prevents other processes from reading or writing the file while
|
||||
// the update is in progress. It also locks out readers during write
|
||||
// operations.
|
||||
using (FileStream fs = new FileStream(fileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None))
|
||||
using (FileStream fs = WaitForFile(fileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None))
|
||||
{
|
||||
JObject jsonObject = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user