Skip to content

Commit

Permalink
Hide misleading error messages on satisfied? checks
Browse files Browse the repository at this point in the history
  • Loading branch information
lloeki committed Jan 31, 2025
1 parent 37b9fc3 commit 3e52164
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/docker.rake
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ namespace :docker do
def image_time(image)
require "time"

last_tag_time = `docker image inspect -f '{{ .Metadata.LastTagTime }}' '#{image}'`.chomp
last_tag_time = `docker image inspect -f '{{ .Metadata.LastTagTime }}' '#{image}' 2>/dev/null`.chomp

if $?.to_i == 0
# "0001-01-01 00:00:00 +0000 UTC"
Expand All @@ -182,7 +182,7 @@ namespace :docker do
def volume_time(volume)
require "time"

volume_creation_time = `docker volume inspect -f '{{ .CreatedAt }}' '#{volume}'`.chomp
volume_creation_time = `docker volume inspect -f '{{ .CreatedAt }}' '#{volume}' 2>/dev/null`.chomp

if $?.to_i == 0
volume_creation_time.sub!(/^(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})(\s+)/, "\\1.0\\2")
Expand Down

0 comments on commit 3e52164

Please sign in to comment.