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 +4 -4
- data/lib/norad_cli/cli/sectest.rb +7 -2
- data/lib/norad_cli/version.rb +1 -1
- 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: 7e59ae272be4575213e6e4a1ae0006a84e5eb069
|
4
|
+
data.tar.gz: fcd29e17a780f3550a3c62d4b16c505db7268b9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
#
|
332
|
-
|
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
|
data/lib/norad_cli/version.rb
CHANGED