mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Run file age check, only if we can get a value from __fisher_get_file_age.
This probably means the user does not have python installed on their system and we will be download the index every time the user runs ls-remote. A more sensitive, python-less solution to check file age since the last time the file was modified should be more desirable.
This commit is contained in:
parent
b8884dc3e0
commit
0219a4a618
1 changed files with 4 additions and 2 deletions
|
@ -817,8 +817,10 @@ function __fisher_remote_index_update
|
|||
end
|
||||
|
||||
if test -s "$index"
|
||||
if test (__fisher_get_file_age "$index") -lt "$interval"
|
||||
return
|
||||
if set -l file_age (__fisher_get_file_age "$index")
|
||||
if test "$file_age" -lt "$interval"
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue