You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find many aspects of this snippet puzzling.
Line 168 is clearly unnecessary code as it is already in line 174.
Also, if you're going to use $i and $total, isn't it more natural to use for and $array.Count instead of foreach?
In the first place, $total is not even defined.
@kakogawa the snippets are community maintained. @o-l-a-v has a (great) PR ensuring the JSON is valid, please feel free to submit an update to the snippet after that making it more PowerShell-y.
* Fixed JSON
* Added test for making sure all JSON files are valid JSON
* Run in correct dir
* Simplify title of the new step
Co-authored-by: Andy Jordan <[email protected]>
* Fix path double nesting
Co-authored-by: Andy Jordan <[email protected]>
* Add spaces after commas
Co-authored-by: Andy Jordan <[email protected]>
* Use $PWD instead of '.\' for current dir 🐧
* Only test the snippets JSON file
* Oops, typo
---------
Co-authored-by: Andy Jordan <[email protected]>
Prerequisites
Summary
Error in foreach-progress snippet
ms-vscode.powershell-2024.4.0\snippets\PowerShell.json

Run the snippet

PowerShell Version
Visual Studio Code Version
Extension Version
[email protected]
Steps to Reproduce
use foreach-progress snippet
Visuals
No response
Logs
No response
The text was updated successfully, but these errors were encountered: