Skip to contents

Reads the provenance block written by edaphos_provenance() and reports whether the producing script has changed since the bundle was built.

Usage

edaphos_provenance_check(bundle, root = ".")

Arguments

bundle

Either a path to an .rds or an already-loaded list.

root

Package root to resolve the recorded script path against. Defaults to the current directory.

Value

A list with ok (logical, or NA when the bundle carries no provenance) and reason. ok = NA is deliberately not FALSE: a bundle with no block is unbindable rather than stale, and the two want different remedies.

Examples

# A bundle that carries no provenance reports NA, not FALSE.
edaphos_provenance_check(list(a = 1))
#> $ok
#> [1] NA
#> 
#> $reason
#> [1] "no provenance block"
#>