From 234313a7fe4b32c8879001ddd3cd3fbe06f8804d Mon Sep 17 00:00:00 2001 From: Jamie Slome Date: Mon, 21 Oct 2024 10:03:07 +0100 Subject: [PATCH] fix: move creation of remote folder into function call --- src/proxy/processors/push-action/pullRemote.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/proxy/processors/push-action/pullRemote.js b/src/proxy/processors/push-action/pullRemote.js index 7d31edf7..2520dd40 100644 --- a/src/proxy/processors/push-action/pullRemote.js +++ b/src/proxy/processors/push-action/pullRemote.js @@ -3,10 +3,6 @@ const Step = require('../../actions').Step; const fs = require('fs'); const dir = './.remote'; -if (!fs.existsSync(dir)) { - fs.mkdirSync(dir); -} - const exec = async (req, action) => { const step = new Step('pullRemote'); @@ -15,6 +11,10 @@ const exec = async (req, action) => { step.log(`Creating folder ${action.proxyGitPath}`); + if (!fs.existsSync(dir)) { + fs.mkdirSync(dir); + } + if (!fs.existsSync(action.proxyGitPath)) { fs.mkdirSync(action.proxyGitPath, '0777', true); }