Skip to content

Commit 47e8624

Browse files
committed
Formating secrets.js
1 parent 19ca246 commit 47e8624

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

lib/resolve/secrets.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
'use strict';
22

3-
const fs = require('fs');
4-
const path = require('path');
5-
6-
const SECRETS_DIR = '/run/secrets';
7-
const output = {};
3+
const fs = require('fs'),
4+
path = require('path'),
5+
SECRETS_DIR = '/run/secrets',
6+
output = {};
87

98
if (fs.existsSync(SECRETS_DIR)) {
10-
const files = fs.readdirSync(SECRETS_DIR);
11-
12-
files.forEach(function(file, index) {
13-
const fullPath = path.join(SECRETS_DIR, file);
14-
const key = file;
15-
const data = fs.readFileSync(fullPath, 'utf8').toString().trim();
9+
const files = fs.readdirSync(SECRETS_DIR);
1610

17-
output[key] = data;
18-
});
11+
files.forEach((file) => {
12+
const fullPath = path.join(SECRETS_DIR, file),
13+
key = file,
14+
data = fs.readFileSync(fullPath, 'utf8').toString().trim();
15+
output[key] = data;
16+
});
1917
}
2018

2119
module.exports = output;

0 commit comments

Comments
 (0)