Polling for a file can be a common pattern. Consider implementing a generic file watcher function in HelpersCommon.psm1.
while (((Get-Date) - $startTime).TotalSeconds -lt 10 -and (-not (Test-Path "$HOME/nativeCommandProcessor.Success"))) {
Start-Sleep -Milliseconds 100
}
See #4523 (comment)
Polling for a file can be a common pattern. Consider implementing a generic file watcher function in HelpersCommon.psm1.