Skip to content

Commit 234313a

Browse files
committed
fix: move creation of remote folder into function call
1 parent a1d8f42 commit 234313a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/proxy/processors/push-action/pullRemote.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ const Step = require('../../actions').Step;
33
const fs = require('fs');
44
const dir = './.remote';
55

6-
if (!fs.existsSync(dir)) {
7-
fs.mkdirSync(dir);
8-
}
9-
106
const exec = async (req, action) => {
117
const step = new Step('pullRemote');
128

@@ -15,6 +11,10 @@ const exec = async (req, action) => {
1511

1612
step.log(`Creating folder ${action.proxyGitPath}`);
1713

14+
if (!fs.existsSync(dir)) {
15+
fs.mkdirSync(dir);
16+
}
17+
1818
if (!fs.existsSync(action.proxyGitPath)) {
1919
fs.mkdirSync(action.proxyGitPath, '0777', true);
2020
}

0 commit comments

Comments
 (0)