Skip to content

Commit

Permalink
fix global var
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Aug 24, 2023
1 parent 45ad4b7 commit 8e0da9e
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions R/class_aws.R
Original file line number Diff line number Diff line change
Expand Up @@ -254,31 +254,19 @@ store_ensure_correct_hash.tar_aws <- function(store, storage, deployment) {

#' @export
store_has_correct_hash.tar_aws <- function(store) {
path <- store$file$path
bucket <- store_aws_bucket(path)
region <- store_aws_region(path)
endpoint <- store_aws_endpoint(path)
key <- store_aws_key(path)
version <- store_aws_version(path)
hash <- store_aws_hash(
key = key,
bucket = bucket,
region = region,
endpoint = endpoint,
version = version,
args = store$resources$aws$args
)
hash <- store_aws_hash(store)
!is.null(hash) && identical(hash, store$file$hash)
}

store_aws_hash <- function(key, bucket, region, endpoint, version, args) {
store_aws_hash <- function(store) {
path <- store$file$path
head <- aws_s3_head(
key = key,
bucket = bucket,
region = region,
endpoint = endpoint,
version = version,
args = args,
key = store_aws_key(path),
bucket = store_aws_bucket(path),
region = store_aws_region(path),
endpoint = store_aws_endpoint(path),
version = store_aws_version(path),
args = store$resources$aws$args,
seconds_interval = store$resources$network$seconds_interval %|||% 0L,
seconds_timeout = store$resources$network$seconds_timeout %|||% 0L,
max_tries = store$resources$network$max_tries %|||% 5L,
Expand Down

0 comments on commit 8e0da9e

Please sign in to comment.