Fix issue with querying yesterday's stats without a data file
This commit is contained in:
5
cv
5
cv
@@ -41,6 +41,8 @@ result(){
|
||||
echo "Active: $(get active)"
|
||||
echo "New: $(get todayCases)"
|
||||
echo "Tests: $(get tests)"
|
||||
if [ -f $data/$ydate-$country ]
|
||||
then
|
||||
show "Yesterday's stats:"
|
||||
echo "New: $(yget todayCases)"
|
||||
if [ $(get todayCases) == "0" ]
|
||||
@@ -59,6 +61,9 @@ result(){
|
||||
ex "rm $data/$date-$country"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
show "Yesterday's data file for this country doesn't exist."
|
||||
fi
|
||||
}
|
||||
|
||||
show "Queried at: $date"
|
||||
|
Reference in New Issue
Block a user