We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df3d2b0 commit 7ce43adCopy full SHA for 7ce43ad
lib/puppet/parser/functions/docker_run_flags.rb
@@ -1,18 +1,19 @@
1
# frozen_string_literal: true
2
3
-require 'shellwords'
4
#
5
# docker_run_flags.rb
6
7
module Puppet::Parser::Functions
8
newfunction(:'docker::escape', type: :rvalue) do |args|
9
subject = args[0]
10
11
- if self['facts'] && self['facts']['os']['family'] == 'windows'
12
- call_function('powershell_escape', subject)
13
- else
14
- subject.shellescape
15
- end
+ escape_function = if self['facts'] && self['facts']['os']['family'] == 'windows'
+ 'powershell_escape'
+ else
+ 'shell_escape'
+ end
+
16
+ call_function(escape_function, subject)
17
end
18
19
# Transforms a hash into a string of docker flags
0 commit comments