Open hadley opened 11 months ago
sqlite_driver_default <- function() {
# Assume that if SQLite driver is setup up it's correct
drivers <- unique(odbcListDrivers()$name)
if ("SQLite" %in% drivers) {
return("SQLite")
}
if (Sys.info()["sysname"] == "Darwin") {
if (Sys.which("brew") == "") {
abort("Homebrew is not installed")
}
paths <- system("brew list sqliteodbc", intern = TRUE)
if (attr(paths, "status") != 0) {
abort("Failed to list sqliteodbc brew file")
}
paths[basename(paths) == "libsqlite3odbc.dylib"]
} else {
abort("Autodiscovery currently only supported on macOS")
}
}
Supported arguments: