Skip to content
Snippets Groups Projects
Commit 1fa48234 authored by Zhiming Wang's avatar Zhiming Wang Committed by Martin Afanasjew
Browse files

tab: include installation date in string representation


This way brew info will include the installation date for each installed
version.

Closes #196.

Signed-off-by: default avatarMartin Afanasjew <martin@afanasjew.de>
parent 742df8bb
No related branches found
No related tags found
No related merge requests found
......@@ -246,12 +246,15 @@ class Tab < OpenStruct
def to_s
s = []
case poured_from_bottle
when true then s << "Poured from bottle"
when false then s << "Built from source"
if poured_from_bottle
s << "Poured from bottle"
else
s << "Built from source"
end
if time
s << Time.at(time).strftime("on %Y-%m-%d at %H:%M:%S")
end
unless used_options.empty?
s << "Installed" if s.empty?
s << "with:"
s << used_options.to_a.join(" ")
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment