Skip to content

Commit

Permalink
Package load messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mem48 committed Feb 7, 2025
1 parent 72d177b commit e02b051
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions R/extdata.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,23 @@ update_data <- function( timeout=60 ){
response <- readline("UK2GTFS data is out of date. Do you want to update? (yes/no): ")
response <- tolower(response)

if (response == "yes" || response == "y") {
message("Updating internal package data")
if (response %in% c("yes","y","YES","Y")) {
packageStartupMessage("Updating internal package data")
download_data(check$tag_name, check$package_location, check$date)
} else if (response == "no" || response == "n") {
} else if (response %in% c("no","n","NO","N")) {
cat("You can rerun this check with update_data()")
} else {
cat("Invalid response.\n")
}


} else {
message("Data not updated, run update_data()")
message("Updating internal package data")
packageStartupMessage ("Updating internal package data")
download_data(check$tag_name, check$package_location, check$date)
}

} else {
message("Your UK2GTFS data is up to date")
packageStartupMessage("Your UK2GTFS data is up to date")
}

}
Expand Down

0 comments on commit e02b051

Please sign in to comment.