(MODULES-4976) Add windows escaping functions#1235
(MODULES-4976) Add windows escaping functions#1235bastelfreak merged 1 commit intopuppetlabs:mainfrom
Conversation
The shell_escape function is not usable on windows where batch files and powershell scripts use different escape rules. Add two functions to escape strings on windots for batch (batch_escape) and powershell (powershell_escape).
batch_escape is a functionthat may have no external impact to Forge modules. powershell_escape is a functionthat may have no external impact to Forge modules. This module is declared in 318 of 579 indexed public
|
|
thanks! |
|
What's with these functions using the old API? |
|
@alexjfisher probably nothing, I though it makes more sense to have these functions beside Is there something preventing from moving all those legacy functions to newer ones? |
TLDR: Pick some functions you care about and go for it! Other than time, in most cases no. There was #1079 Not too sure what happened. Perhaps it autoclosed when the branch it was targeting got deleted? @binford2k ?? Any thoughts? That PR was also going to namespace all functions which would have been a breaking change. If namespacing functions, maybe providing deprecated non-namespaced shims like I did in https://github.com/puppetlabs/puppetlabs-postgresql/blob/7992559aaa219d0f736a6b661d48d2e721c322a1/lib/puppet/functions/postgresql_password.rb would be worth doing. |
The
shell_escapefunction is not usable on windows where batch files andpowershell scripts use different escape rules.
Add two functions to escape strings on windots for batch (
batch_escape)and powershell (
powershell_escape).