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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '029d796a1f1d80a039fc1765f194b6b9cd144ceed002568bc9f38275814bb31a'
4
- data.tar.gz: 13c45a601b75b7a32dba0824a3424f1f34adc86dc176957318eabc783416ca2d
3
+ metadata.gz: 3599b0a90a3528f5366a5ea007c213b60d66e47070e0ab419f267c7786587760
4
+ data.tar.gz: 5afad9f0783d325bdf5ccc72f84d3b4e7308ff326dab3c5d0837e029ab5b234e
5
5
  SHA512:
6
- metadata.gz: b9941bb1dab65040e55e2711681283ab43a12c5715ea3af8a64b349a110a80e2066380109d6567667bb00fa898b9f66b34f5c000d382d989419e310d14a27531
7
- data.tar.gz: 6e5f11ceb6282415d6f8d164c3bde0620c9d2f9886af96d8c08f55d329ebb21efd65d4198dad3669e19566075b08df324abdfe3c0feb57eb605820f5ccff1447
6
+ metadata.gz: e57b54f645f50bc881a3702f54cb3a91ce099351047b75bd00df8aebfdea2536fb257756dd6f7d2277d629578d6afa764c7531befcd8b3b4eaf58e6174bbb818
7
+ data.tar.gz: cc735ce314bd1c1f5e8f543d1a4f145dd61465cb236f8c99adc79d73104d454f00d4d79d0087daefa0be5b877eab76166ca14b3c87dff8892d469421de512e4e
@@ -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
- source.each(4096) do |chunk|
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wip
4
- VERSION = '0.7.2'
4
+ VERSION = '0.7.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wslc-wip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wip contributors