mixlib-shellout 3.3.3-x64-mingw-ucrt → 3.3.4-x64-mingw-ucrt

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35f15cebdb3714d50e21662d40191a54cefeb01cf7dd477650e01340193e4128
4
- data.tar.gz: f738c4df369f8e5fc4df70bed9ae3e582e93d1bc4fa93770a525b81861e63d4f
3
+ metadata.gz: 8789e8a7e29294efe48b370f762e0ba347cc08779a1ebd2e087c1ae434c464ea
4
+ data.tar.gz: 3c2ac142acb8d1dd8e4966daaef3a3026005346e996cafa19dacc3d0d1ef3255
5
5
  SHA512:
6
- metadata.gz: 8901f19ff920f201c1213107c3b51b9bb52fe0ee367c51bec3873f089bf59883d0ece0ab13e2ecd6451467c4e72b4be0a65dfe18f2d5ae2231ee403ca3ec96ce
7
- data.tar.gz: 13d2938c185e57ed9a6442d6ce2b9e94ee0d9368826497909f4ee27311f455872466343eda5efa9c38a260b989b7fc63467aa3d8dbd73fdf6602d7c21dbe45f2
6
+ metadata.gz: 755126fd263dbcb3ac582ec9f40b9e6a8937d6ed13e4621814b410adea18af6cdfaba089b65ac2a6c2d6987c4296b034be9438fbca331f8d79f0cbcfcbc3fa2b
7
+ data.tar.gz: a63cb8adc5c005a104dbf6786eda1e66898012b29611623c4806f94b601ef11db8d5f3db1d4eb6a1142a7b14a06b5afa387488f7357cfa5b2ecbdb93f63bf468
@@ -143,14 +143,17 @@ module Mixlib
143
143
 
144
144
  # Join arguments into a string.
145
145
  #
146
- # If the argument ends with a whitespace, use it as-is. Otherwise, add
147
- # a space at the end
146
+ # Strips leading/trailing spaces from each argument. If an argument contains
147
+ # a space, it is quoted. Join into a single string with spaces between each argument.
148
148
  #
149
149
  # @param args [String] variable number of string arguments
150
150
  # @return [String] merged string
151
151
  #
152
152
  def __join_whitespace(*args)
153
- args.flatten.map { |e| e + (e.rstrip == e ? " " : "") }.join
153
+ args.flatten.map do |arg|
154
+ arg.strip!
155
+ arg.include?(" ") ? sprintf('"%s"', arg) : arg
156
+ end.join(" ")
154
157
  end
155
158
 
156
159
  def __shell_out_command(*args, **options)
@@ -1,5 +1,5 @@
1
1
  module Mixlib
2
2
  class ShellOut
3
- VERSION = "3.3.3".freeze
3
+ VERSION = "3.3.4".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixlib-shellout
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.3
4
+ version: 3.3.4
5
5
  platform: x64-mingw-ucrt
6
6
  authors:
7
7
  - Chef Software Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-14 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-utils