mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
Let last_update_check use lib/const.rb last data modification time if git isn't setup yet during install. (#10304)
Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
5621163c84
commit
4fbfe7cf8e
3
bin/crew
3
bin/crew
@@ -1924,8 +1924,7 @@ end
|
||||
|
||||
load_json
|
||||
|
||||
@last_update_check = `stat -c %Y #{File.join(CREW_LIB_PATH, '.git/FETCH_HEAD')}`.chomp.to_i
|
||||
@last_update_check = @last_update_check.blank? ? 0 : @last_update_check
|
||||
@last_update_check = File.file?(File.join(CREW_LIB_PATH, '.git/FETCH_HEAD')) ? `stat -c %Y #{File.join(CREW_LIB_PATH, '.git/FETCH_HEAD')}`.chomp.to_i : `stat -c %Y #{File.join(CREW_LIB_PATH, 'lib/const.rb')}`.chomp.to_i
|
||||
crewlog("The last update was #{time_difference(@last_update_check, Time.now.to_i)} ago.")
|
||||
puts "It has been more than #{CREW_UPDATE_CHECK_INTERVAL} day#{CREW_UPDATE_CHECK_INTERVAL < 2 ? '' : 's'} since crew was last updated. Please run 'crew update'".lightpurple if Time.now.to_i - @last_update_check > (CREW_UPDATE_CHECK_INTERVAL * 3600 * 24)
|
||||
command_name = args.select { |k, v| v && command?(k) }.keys[0]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Defines common constants used in different parts of crew
|
||||
require 'etc'
|
||||
|
||||
CREW_VERSION = '1.50.2'
|
||||
CREW_VERSION = '1.50.3'
|
||||
|
||||
# Kernel architecture.
|
||||
KERN_ARCH = Etc.uname[:machine]
|
||||
|
||||
Reference in New Issue
Block a user