norad_cli 0.1.18 → 0.1.19

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: c76972ccc6770677c3120ed70cd195c043141647
4
- data.tar.gz: c58525f06bafa832759511b0178a46c677168981
3
+ metadata.gz: 7e59ae272be4575213e6e4a1ae0006a84e5eb069
4
+ data.tar.gz: fcd29e17a780f3550a3c62d4b16c505db7268b9e
5
5
  SHA512:
6
- metadata.gz: 8d476040efc1bef4484ec3791433741cbd7c8d52974b3187cf44ffa7712f4709338e36c4c8c7029b883e2647bfd9eda83216e8fdf112f5cba6981cf92b33cc2d
7
- data.tar.gz: c542973a351aec58583a7badb70df367f286152be2ce0e1203ae4dc8228283505336bc04ab8104a6ad92c32539b0fa1a2f2190a9bf6c6547fb38462c22122890
6
+ metadata.gz: 292d9d37e8061927977261226c463d5fd02f0020ad92147d99d6e100e5ed60bddd05bfce0e191c42ff0a1d966f06b4332923216cf26266a15e2ef6864eb1a458
7
+ data.tar.gz: 784a9255cf124973739cb992b776c6b1ef3d2183eb91d71c1707ebc6ed43de371c5759c85370a74a54ccf3728f15d79d4e84f0c9765e71abf35cd48bab9b1b9f
@@ -328,8 +328,13 @@ class Sectest < Thor
328
328
  # Check for a base image
329
329
  def extract_base_img(img_dir)
330
330
  from_line = File.readlines("#{img_dir}/Dockerfile").select { |line| line =~ /^FROM/ }
331
- # Check for multiple from lines?
332
- from_line_arr = from_line[0].split(' ')
331
+ # Detect missing FROM lines
332
+ if from_line.length.zero?
333
+ puts Rainbow("Error: #{img_dir}/Dockerfile missing a FROM line!").red
334
+ exit(1)
335
+ else
336
+ from_line_arr = from_line[0].split(' ')
337
+ end
333
338
  from_image = from_line[0][%r{\AFROM\s+(.*?\/)?(.*?)(:.*?)?\Z}i, 2] || raise('bad from')
334
339
  [from_image, from_line_arr[1]]
335
340
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module NoradCli
3
- VERSION = '0.1.18'
3
+ VERSION = '0.1.19'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: norad_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Hitchcock