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

(maint) Update powershell helpers to escape correctly for linux #2642

Merged
merged 3 commits into from
Feb 19, 2021

Conversation

mcdonaldseanp
Copy link
Contributor

This commit updates the PuppetBolt powershell module to correctly escape hash
parameters for linux platforms. Conversation in this thread:
MicrosoftDocs/PowerShell-Docs#2361 describe the
circumstances of why interpolation breaks.

The fix is to include backslash escape chars for all quotes in hash parameters
if the powershell function is running on linux

@mcdonaldseanp mcdonaldseanp requested a review from a team as a code owner February 16, 2021 18:32
pwsh_module/pwsh_bolt_internal.ps1 Outdated Show resolved Hide resolved
This commit updates the PuppetBolt powershell module to correctly escape hash
parameters for linux platforms. Conversation in this thread:
MicrosoftDocs/PowerShell-Docs#2361 describe the
circumstances of why interpolation breaks.

The fix is to include backslash escape chars for all quotes in hash parameters
if the powershell function is running on linux

!no-release-note
@jpogran
Copy link
Contributor

jpogran commented Feb 19, 2021

@mcdonaldseanp just need to update CI to run these tests on nix and macos, and adjust the pester tests to account for the text changes and we're good to go!

This commit updates the pester tests for the pwsh module to correctly test for
the new format of params parsing on unix based platforms
This commit updates the pwsh module testing to include a matrix of unix, macos
and windows platforms instead of just windows
@jpogran jpogran merged commit 95d61c7 into puppetlabs:main Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants