From 7f1326debb241e8dcf337026b39492aa95e5e076 Mon Sep 17 00:00:00 2001 From: Roland Sherwin Date: Thu, 5 Dec 2024 02:10:35 +0530 Subject: [PATCH] debug --- .github/workflows/merge.yml | 3 +++ ant-bootstrap/src/cache_store.rs | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index f306759803..f059f6a591 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -201,6 +201,9 @@ jobs: node-path: target/release/antnode platform: ${{ matrix.os }} build: true + - name: Setup tmate session + if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 - name: Check if ANT_PEERS and EVM_NETWORK are set shell: bash diff --git a/ant-bootstrap/src/cache_store.rs b/ant-bootstrap/src/cache_store.rs index c3d79f045b..8c8d7fe4c9 100644 --- a/ant-bootstrap/src/cache_store.rs +++ b/ant-bootstrap/src/cache_store.rs @@ -425,8 +425,11 @@ impl BootstrapCacheStore { } // Create a temporary file in the same directory as the cache file - let temp_dir = std::env::temp_dir(); - let temp_file = NamedTempFile::new_in(&temp_dir)?; + let temp_file = NamedTempFile::new_in( + self.cache_path + .parent() + .ok_or(Error::CouldNotObtainDataDir)?, + )?; // Write data to temporary file serde_json::to_writer_pretty(&temp_file, &self.data)?;