train-core 3.7.2 → 3.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/train/file/remote/windows.rb +1 -1
- data/lib/train/transports/local.rb +21 -8
- data/lib/train/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ccf18cbe443b73ae4ddf1d26acd7bd86730482130481d2d1ab4110311829cba
|
4
|
+
data.tar.gz: 4e377e9a24cfe32eefa8b4a09a5c54a65f1acf8d1d120eb76e4170e45238dc3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23bec0bbce7a152996c8c881211fc46908637720f768c3e1254b44409b7da2091984806165d6545e08354b2291d7652f9c1db0b9f930e6a6998a0e5506553d48
|
7
|
+
data.tar.gz: 0eb390214488b1b6ae193235b4c9addc1c3750349b8e5ec59c8314dc5a746ab9533d47b8774bb872baabd339768dd1f0e8b6c7c84edb1fbb7a95b2cadf2a71ba
|
@@ -190,8 +190,23 @@ module Train::Transports
|
|
190
190
|
script = "$ProgressPreference='SilentlyContinue';" + cmd
|
191
191
|
encoded_script = Base64.strict_encode64(script)
|
192
192
|
# TODO: no way to safely implement timeouts here.
|
193
|
-
|
194
|
-
|
193
|
+
begin
|
194
|
+
@pipe.puts(encoded_script)
|
195
|
+
@pipe.flush
|
196
|
+
rescue Errno::EPIPE
|
197
|
+
# Retry once if the pipe went away
|
198
|
+
begin
|
199
|
+
# Maybe the pipe went away, but the server didn't? Reset it, to get a clean start.
|
200
|
+
close
|
201
|
+
rescue Errno::EIO
|
202
|
+
# Ignore - server already went away
|
203
|
+
end
|
204
|
+
@pipe = acquire_pipe
|
205
|
+
raise PipeError if @pipe.nil?
|
206
|
+
|
207
|
+
@pipe.puts(encoded_script)
|
208
|
+
@pipe.flush
|
209
|
+
end
|
195
210
|
res = OpenStruct.new(JSON.parse(Base64.decode64(@pipe.readline)))
|
196
211
|
Local::CommandResult.new(res.stdout, res.stderr, res.exitstatus)
|
197
212
|
end
|
@@ -216,12 +231,10 @@ module Train::Transports
|
|
216
231
|
|
217
232
|
# PowerShell needs time to create pipe.
|
218
233
|
100.times do
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
sleep 0.1
|
224
|
-
end
|
234
|
+
pipe = open("//./pipe/#{pipe_name}", "r+")
|
235
|
+
break
|
236
|
+
rescue
|
237
|
+
sleep 0.1
|
225
238
|
end
|
226
239
|
|
227
240
|
pipe
|
data/lib/train/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: train-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.7.
|
4
|
+
version: 3.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef InSpec Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|