From e47915f1b9c3cc56efe2070f1664004d0d0d952a Mon Sep 17 00:00:00 2001 From: Emma Turetsky Date: Fri, 22 Nov 2024 15:26:30 +0000 Subject: [PATCH] Fixed macos failing tests: Pinned macos xrootd to last working version Added an error check in LocalCache.Stat() --- github_scripts/osx_install.sh | 3 ++- local_cache/local_cache.go | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/github_scripts/osx_install.sh b/github_scripts/osx_install.sh index ac9eff625..635aaf6a2 100755 --- a/github_scripts/osx_install.sh +++ b/github_scripts/osx_install.sh @@ -43,8 +43,9 @@ popd # Build XRootD from source # Add patches to xrootd source code if needed -git clone --depth=1 https://github.com/xrootd/xrootd.git +git clone --depth=10 https://github.com/xrootd/xrootd.git pushd xrootd +git checkout d74b2af36d04c398a91235bd2de32ee1283e92fe patch -p1 < $scriptdir/pelican_protocol.patch mkdir xrootd_build cd xrootd_build diff --git a/local_cache/local_cache.go b/local_cache/local_cache.go index 71df19cdf..1cfd77dfb 100644 --- a/local_cache/local_cache.go +++ b/local_cache/local_cache.go @@ -718,6 +718,9 @@ func (lc *LocalCache) Stat(path, token string) (uint64, error) { dUrl.Path = path dUrl.Scheme = "pelican" statInfo, err := client.DoStat(context.Background(), dUrl.String(), client.WithToken(token)) + if err != nil { + return 0, err + } return uint64(statInfo.Size), err }