Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes incorrect error message on passed ScriptBlock by -Variables #34

Merged

Conversation

santisq
Copy link
Owner

@santisq santisq commented Jun 24, 2024

Fixes incorrect method call on AddVariables extension method.

Invoke-Parallel v1.1.6

PS \> $null | Invoke-Parallel { $var } -Variables @{ var = {} }
# Invoke-Parallel: A $using: variable cannot be a script block. Passed-in script block variables are not supported, and can result in undefined behavior.

Invoke-Parallel v1.1.7

PS \> $null | Invoke-Parallel { $var } -Variables @{ var = {} }
# Invoke-Parallel: Passed-in script block variables are not supported, and can result in undefined behavior.

@santisq santisq added the bug Something isn't working label Jun 24, 2024
@santisq santisq self-assigned this Jun 24, 2024
@santisq santisq linked an issue Jun 24, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.85%. Comparing base (d947183) to head (e1f1957).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #34      +/-   ##
==========================================
+ Coverage   88.99%   90.85%   +1.86%     
==========================================
  Files           9        9              
  Lines         536      536              
  Branches       40       40              
==========================================
+ Hits          477      487      +10     
+ Misses         49       39      -10     
  Partials       10       10              
Flag Coverage Δ
PS-5.1 90.54% <ø> (+2.25%) ⬆️
PS-7_Linux 90.85% <100.00%> (+1.86%) ⬆️
PS-7_Windows 90.54% <ø> (+2.25%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@santisq santisq merged commit 43f83ee into main Jun 24, 2024
7 checks passed
@santisq santisq deleted the 33-incorrect-error-message-on-passed-scriptblock-by-variables branch June 24, 2024 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect error message on passed scriptblock by -Variables
1 participant