Paul Higinbotham
cadd5762ea
Fix ForEach-Object -Parallel when passing in script block variable ( #16564 )
...
ForeEach-Object -Parallel using variable processing walks the script block AST to determine if the using variable was defined in the current scope, and does this by tracking the number of 'ForEach-Object -Parallel' commands in the call chain.
However, the provided script block is different, depending on whether it is passed in as a variable or via parameter binding.
$myScript = '"Hello!"'
1 | ForEach-Object -Parallel ([scriptblock]::Create($myScript))
# Script block Ast does not contain the 'ForEach-Object' command in the call chain
1 | ForEach-Object -Parallel { "Hello!" }
# Script block Ast does contain the 'ForEach-Object' command in the call chain
This change takes into account the two forms of script blocks
2021-12-14 08:11:19 +05:00
..
2020-06-02 13:51:57 -07:00
2020-05-07 17:00:30 +05:00
2021-08-30 13:56:52 -07:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-05-07 17:00:30 +05:00
2020-05-07 17:00:30 +05:00
2020-05-23 13:24:53 +00:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2021-08-04 14:47:57 -07:00
2020-05-07 17:00:30 +05:00
2021-07-12 10:56:33 -07:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-07-21 11:48:54 -07:00
2020-07-21 11:48:54 -07:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2021-12-14 08:11:19 +05:00
2021-07-20 09:02:52 +05:00
2020-04-07 14:33:15 -07:00
2021-08-16 14:17:07 -07:00
2021-08-16 14:17:07 -07:00
2020-05-07 17:00:30 +05:00
2020-05-07 17:00:30 +05:00
2021-01-10 18:03:05 +05:00
2020-03-24 11:08:37 -07:00
2021-03-01 16:37:15 -08:00
2021-08-16 14:17:07 -07:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2020-06-23 14:07:52 -07:00
2021-08-09 14:01:57 -07:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-06-23 14:07:52 -07:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-05-07 17:00:30 +05:00
2020-05-07 17:00:30 +05:00
2020-05-07 17:00:30 +05:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-05-07 17:00:30 +05:00
2020-05-07 17:00:30 +05:00
2020-05-07 17:00:30 +05:00
2021-10-28 11:56:55 -07:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2021-08-09 15:27:09 -07:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-05-07 17:00:30 +05:00
2021-07-20 09:02:52 +05:00
2020-05-07 17:00:30 +05:00
2021-08-09 14:01:57 -07:00
2020-07-30 22:16:37 -07:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-07-21 11:48:54 -07:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2021-08-09 14:01:57 -07:00
2020-05-07 17:00:30 +05:00
2020-06-19 15:46:54 -07:00
2021-08-16 14:17:07 -07:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2021-08-30 13:56:52 -07:00
2021-07-20 09:02:52 +05:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2021-11-01 23:06:05 -07:00
2020-06-02 13:51:57 -07:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00
2020-05-07 17:00:30 +05:00
2020-03-24 11:08:37 -07:00
2021-11-02 16:53:36 -07:00
2020-03-24 11:08:37 -07:00
2021-07-21 18:05:06 -07:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2021-05-17 09:54:37 -07:00
2020-03-24 11:08:37 -07:00
2020-03-24 11:08:37 -07:00
2020-05-07 17:00:30 +05:00