fidoci 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fidoci/env.rb +15 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80f0134e171cd9eee7e9c360fd7cb01eb010aeed
|
4
|
+
data.tar.gz: 5ab4322d0b6105ba143edf3021eccc0037e950d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56cc4658a5f9a2502b4a2e38fc7e65b03464893922a339ac613b8ad4f9908a6798989372d104acde34c5b96de6d862d18b8d4c24edba2e76d910417f7aa98113
|
7
|
+
data.tar.gz: 3b01864360eabf3c9d95004f56a77ba01dfae83c30ca7792c8f289e9d39f598be2c45511abc9b2ec5fff6d1615292055cc66525193a4dc74e59d076e63c69609
|
data/lib/fidoci/env.rb
CHANGED
@@ -208,8 +208,12 @@ module Fidoci
|
|
208
208
|
params["Cmd"] = args
|
209
209
|
|
210
210
|
docker_exec = Docker::Exec.create(params)
|
211
|
-
result =
|
212
|
-
|
211
|
+
result = nil
|
212
|
+
|
213
|
+
$stdin.raw do
|
214
|
+
result = docker_exec.start!(tty: true, stdin: $stdin) do |msg|
|
215
|
+
$stdout << msg
|
216
|
+
end
|
213
217
|
end
|
214
218
|
|
215
219
|
debug "Exited with status #{result[2]}"
|
@@ -241,8 +245,16 @@ module Fidoci
|
|
241
245
|
|
242
246
|
container = Docker::Container.create(params)
|
243
247
|
|
244
|
-
|
248
|
+
receiver = ->(msg) {
|
245
249
|
$stdout << msg
|
250
|
+
}
|
251
|
+
|
252
|
+
if $stdin && $stdin.tty?
|
253
|
+
$stdin.raw do
|
254
|
+
container.start!.attach(tty: true, stdin: $stdin, &receiver)
|
255
|
+
end
|
256
|
+
else
|
257
|
+
container.start!.attach(tty: true, &receiver)
|
246
258
|
end
|
247
259
|
|
248
260
|
status = container.json['State']['ExitCode']
|