wslc-wip 0.7.2 → 0.7.3
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 +4 -4
- data/lib/wip/command_runner.rb +14 -1
- data/lib/wip/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3599b0a90a3528f5366a5ea007c213b60d66e47070e0ab419f267c7786587760
|
|
4
|
+
data.tar.gz: 5afad9f0783d325bdf5ccc72f84d3b4e7308ff326dab3c5d0837e029ab5b234e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e57b54f645f50bc881a3702f54cb3a91ce099351047b75bd00df8aebfdea2536fb257756dd6f7d2277d629578d6afa764c7531befcd8b3b4eaf58e6174bbb818
|
|
7
|
+
data.tar.gz: cc735ce314bd1c1f5e8f543d1a4f145dd61465cb236f8c99adc79d73104d454f00d4d79d0087daefa0be5b877eab76166ca14b3c87dff8892d469421de512e4e
|
data/lib/wip/command_runner.rb
CHANGED
|
@@ -32,6 +32,9 @@ module Wip
|
|
|
32
32
|
rescue Errno::ENOENT => e
|
|
33
33
|
@stderr.puts e.message
|
|
34
34
|
127
|
|
35
|
+
rescue Interrupt
|
|
36
|
+
@stderr.puts "\nwip: interrupted"
|
|
37
|
+
130
|
|
35
38
|
end
|
|
36
39
|
|
|
37
40
|
private
|
|
@@ -49,9 +52,19 @@ module Wip
|
|
|
49
52
|
127
|
|
50
53
|
end
|
|
51
54
|
|
|
55
|
+
# An Interrupt during the main thread's `join` closes these pipes out from
|
|
56
|
+
# under a still-reading pump thread; treat that as a normal stop rather
|
|
57
|
+
# than an uncaught background-thread exception. Only the read from
|
|
58
|
+
# `source` is rescued, so a genuine write failure on `destination` still
|
|
59
|
+
# surfaces.
|
|
52
60
|
def pump(source, destination, captured)
|
|
53
61
|
Thread.new do
|
|
54
|
-
|
|
62
|
+
loop do
|
|
63
|
+
chunk = begin
|
|
64
|
+
source.readpartial(4096)
|
|
65
|
+
rescue IOError # includes EOFError, raised at end of stream
|
|
66
|
+
break
|
|
67
|
+
end
|
|
55
68
|
destination.write(chunk)
|
|
56
69
|
captured << chunk
|
|
57
70
|
end
|
data/lib/wip/version.rb
CHANGED