diff --git a/NEWS.md b/NEWS.md
index 3b335793..aabc4ccc 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -4,6 +4,7 @@
* Allow branch references to contain multi-element `path` vectors with cloud metadata (#1382, @n8layman).
* Avoid partial matches in internal code (#1384, @olivroy).
+* Add error handling around calls to `ps::ps_disk_partitions()` and `ps::ps_fs_mount_point()`.
## Compatibility
diff --git a/R/class_runtime.R b/R/class_runtime.R
index 69ee32fa..b99b7dac 100644
--- a/R/class_runtime.R
+++ b/R/class_runtime.R
@@ -150,7 +150,19 @@ runtime_set_file_info <- function(runtime, store) {
}
runtime_file_systems <- function() {
- info <- ps::ps_disk_partitions()
+ info <- tryCatch(
+ ps::ps_disk_partitions(),
+ # nocov start
+ error = function(condition) {
+ data.frame(
+ device = character(0L),
+ mountpoint = character(0L),
+ fstype = character(0L),
+ options = character(0L)
+ )
+ }
+ # nocov end
+ )
out <- .subset2(info, "fstype")
names(out) <- .subset2(info, "mountpoint")
out
diff --git a/R/utils_files.R b/R/utils_files.R
index f66d0402..85ec07ff 100644
--- a/R/utils_files.R
+++ b/R/utils_files.R
@@ -109,9 +109,11 @@ trust_timestamps <- function(path) {
file_systems <- runtime_file_systems()
tar_runtime$file_systems <- file_systems
}
- mounts <- ps::ps_fs_mount_point(existing)
- types <- as.character(file_systems[mounts])
- trust[exists] <- !(types %in% unsafe)
+ try({
+ mounts <- ps::ps_fs_mount_point(existing)
+ types <- as.character(file_systems[mounts])
+ trust[exists] <- !(types %in% unsafe)
+ }, silent = TRUE)
}
trust
}
diff --git a/README.Rmd b/README.Rmd
index 5f5ed8d9..83c662bf 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -117,7 +117,6 @@ Please read the [help guide](https://books.ropensci.org/targets/help.html) to le
## Deployment
-* explains how to deploy a pipeline to RStudio Connect ([example code](https://github.com/sol-eng/targets-deployment-rsc)).
* [`tar_github_actions()`](https://docs.ropensci.org/targets/reference/tar_github_actions.html) sets up a pipeline to run on GitHub Actions. The [minimal example](https://github.com/wlandau/targets-minimal) demonstrates this approach.
## Extending and customizing targets
diff --git a/README.md b/README.md
index 8234a11d..207ea4be 100644
--- a/README.md
+++ b/README.md
@@ -195,9 +195,6 @@ to ask for help using `targets`.
## Deployment
-- explains how to deploy a
- pipeline to RStudio Connect ([example
- code](https://github.com/sol-eng/targets-deployment-rsc)).
- [`tar_github_actions()`](https://docs.ropensci.org/targets/reference/tar_github_actions.html)
sets up a pipeline to run on GitHub Actions. The [minimal
example](https://github.com/wlandau/targets-minimal) demonstrates this