Skip to content

Conversation

@PaulHigin
Copy link
Contributor

PR Summary

This PR addresses issue #12194, and fixes a terminating error that is thrown if the current directory is not in a default system drive.

PR Context

Currently we don't initialize a loop iteration runspace with the current runspace state that is running the ForEach-Object command. So if the current directory is in a temporary PowerShell drive a terminating error is thrown because the drive cannot be found, and the ForEach-Object command fails.

Fix is to catch this error and allow the ForEach-Object command to continue. We can look at initializing loop iteration runspaces as a new feature in the future.

PR Checklist

@ghost ghost assigned iSazonov Mar 24, 2020
@PaulHigin PaulHigin requested a review from SteveL-MSFT March 24, 2020 17:52
@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Mar 25, 2020
@iSazonov iSazonov added this to the 7.1.0-preview.2 milestone Mar 31, 2020
@iSazonov iSazonov merged commit a4c996d into PowerShell:master Mar 31, 2020
@PaulHigin PaulHigin deleted the fix-foreachparallel-drive branch March 31, 2020 19:32
@ghost
Copy link

ghost commented Apr 23, 2020

🎉v7.1.0-preview.2 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants