linecook-gem 0.7.22 → 0.7.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b2bd1bafaf402df8a3bac650e9f9d371f42cfc3
4
- data.tar.gz: a1bc59eb9822f4635b4624d469b08bedb29df3b0
3
+ metadata.gz: 346dd5e272f05b7f6ff7af641c93daa667b55e0e
4
+ data.tar.gz: 86ab523201c74aa25a65ace836d5fcfe5ee64916
5
5
  SHA512:
6
- metadata.gz: b3fb2fb62b0379690940c71a9066bdfdc6de5b5f8a52481397cd852d278a48bad7f0a6292e8454c3657279595d07f48794eabdf9d9c7f271d12707f9ac8e356d
7
- data.tar.gz: 21626ae5b763d883fb400958134c92fe2bd273e6ee28cee33f24d700d4da17e978c783e828a76ba0f14fa7cfd95cd2ceacd30d61d61256e285275369d42582a2
6
+ metadata.gz: c97f147b96169e588176ec2fbc6f6d06409c6c62a70ce74d11e7d3b1db8bb6accca1ade4a13e81401508d1ac76d14bdae6a536b69654afc7bdc5bbaff1a6556c
7
+ data.tar.gz: 8aef4e61961447c0fdcc7bbe46bac1e2986792ffc22a2bf3e4da39835cbf77bb85a30afb801c994afa8577a7de849887e543d23ec27179959b5c4f52003112df
data/bin/linecook CHANGED
@@ -7,6 +7,7 @@ begin
7
7
  ENV['THOR_DEBUG'] = '1'
8
8
  etime = Benchmark.realtime { Linecook::CLI.start(ARGV) }
9
9
  $stderr.puts "Completed in #{etime}s"
10
+ exit(0)
10
11
  rescue Thor::UndefinedCommandError, Thor::UnknownArgumentError, Thor::AmbiguousCommandError, Thor::InvocationError => e
11
12
  $stderr.puts(e.message)
12
13
  exit(64)
@@ -27,6 +27,10 @@ module Linecook
27
27
  def save
28
28
  FileUtils.mkdir_p(File.dirname(@image.path))
29
29
  with_retries(5) do
30
+ # You might be wondering "wtf is this"? And how!
31
+ # tl;dr, we want to take the bitwise OR of the return codes for everything in the pipe.
32
+ # so, if any command in the pipe fails, treat the whole pipe to have failed.
33
+ # otherwise, we could end up with xz compressing an invalid export, and treating it as OK.
30
34
  status = system("/bin/bash -c 'docker export #{@image.id} | xz -T 0 -0 > #{@image.path}; exit $((${PIPESTATUS[0]} | ${PIPESTATUS[1]}))'")
31
35
  fail "Export failed" unless status
32
36
  end
@@ -1,3 +1,3 @@
1
1
  module Linecook
2
- VERSION = '0.7.22'
2
+ VERSION = '0.7.23'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linecook-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.22
4
+ version: 0.7.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Hamel