From 7f841deb7cfdb378e5b0fc5c6b97cc0337ffdab2 Mon Sep 17 00:00:00 2001 From: Robert Dyer Date: Thu, 12 Dec 2024 23:16:21 -0600 Subject: [PATCH] load sf credentials from cache dir --- track-investments.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/track-investments.js b/track-investments.js index 19e5ed5..80a485b 100644 --- a/track-investments.js +++ b/track-investments.js @@ -30,7 +30,8 @@ const getCredentials = async () => { const loadCredentials = () => { try { - return fs.readFileSync('simplefin.credentials', 'utf8'); + const cache = process.env.ACTUAL_CACHE_DIR || './cache'; + return fs.readFileSync(cache + '/simplefin.credentials', 'utf8'); } catch (err) { return undefined; }