8000 Set current working directory of each ForEach-Object -Parallel running script to the same location as the calling script. by PaulHigin · Pull Request #10672 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@PaulHigin
Copy link
Contributor

PR Summary

This changes fixes issue, #10537. It sets each parallel running script block context to have the same working directory location as the calling script.

PR Context

Previously, parallel running script blocks would use the default PowerShell working directory, similar to remoting and job execution. But ForEach-Object -Parallel should run all script in the same working directory as the calling script, to make it consistent with ForEach-Object while running in normal (non-parallel) mode.

PR Checklist

Copy link
Member
@SteveL-MSFT SteveL-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iSazonov iSazonov added CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log and removed WG-Cmdlets general cmdlet issues Issue-Bug Issue has been identified as a bug in the product labels Oct 2, 2019
@iSazonov iSazonov added this to the 7.0.0-preview.5 milestone Oct 2, 2019
Copy link
Collaborator
@iSazonov iSazonov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one minor comment.

@PaulHigin PaulHigin removed the request for review from adityapatwardhan October 2, 2019 22:26
@daxian-dbw daxian-dbw merged commit adfbac0 into PowerShell:master Oct 4, 2019
@PaulHigin PaulHigin deleted the fix-foreach-parallel-startdir branch October 4, 2019 17:05
@ghost
Copy link
ghost commented Oct 23, 2019

🎉v7.0.0-preview.5 has been released which incorporates this pull request.:tada:

Handy links:

kilasuit pushed a commit to kilasuit/PowerShell that referenced this pull request Nov 9, 2019
…ing script to the same location as the calling script. (PowerShell#10672)
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 4C21

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

0