EliziumNet / Loopz

PowerShell iteration utilities with additional tools like the Parameter Set Tools
https://eliziumnet.github.io/Loopz/
MIT License
3 stars 0 forks source link

Rename-Many: When error occurs, item should still appear in the output, with the error shown #130

Closed plastikfan closed 3 years ago

plastikfan commented 3 years ago

Currently, if an error occurs, that output does not appear in the output, leaving the user no idea what went wrong.

plastikfan commented 3 years ago

This was partially a user error issue. When using Start/End, an Anchored regex gets created internally. If the Pattern captures the entire source, then 'anchored' status gets activated (because the pattern is now already at the end, so no move is required) and the item is then skipped. So the user has to be careful when using a static anchor with a pattern that consumes the entire source. Also, the user has to be careful which parameters they are using and ensure that Paste is used in update in place scenarios and With for move operations.