consistent formatting

This commit is contained in:
Brent Shikoski 2023-09-08 21:33:09 -05:00
parent 593210456a
commit b07bb67943
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ const runSingleRequest = async function (filename, bruJson, collectionPath, coll
else { else {
const cacertArray = [options['cacert'], process.env.SSL_CERT_FILE, process.env.NODE_EXTRA_CA_CERTS]; const cacertArray = [options['cacert'], process.env.SSL_CERT_FILE, process.env.NODE_EXTRA_CA_CERTS];
const cacert = cacertArray.find(el => el); const cacert = cacertArray.find(el => el);
if (cacert && cacert.length > 1) { if(cacert && cacert.length > 1) {
try { try {
caCrt = fs.readFileSync(cacert); caCrt = fs.readFileSync(cacert);
httpsAgentRequestFields['ca'] = caCrt; httpsAgentRequestFields['ca'] = caCrt;
@ -64,7 +64,7 @@ const runSingleRequest = async function (filename, bruJson, collectionPath, coll
} }
} }
if (Object.keys(httpsAgentRequestFields).length > 0) { if(Object.keys(httpsAgentRequestFields).length > 0) {
request.httpsAgent = new https.Agent({ request.httpsAgent = new https.Agent({
...httpsAgentRequestFields ...httpsAgentRequestFields
}); });

View File

@ -155,7 +155,7 @@ const registerNetworkIpc = (mainWindow, watcher, lastOpenedCollections) => {
else { else {
const cacertArray = [preferences['cacert'], process.env.SSL_CERT_FILE, process.env.NODE_EXTRA_CA_CERTS]; const cacertArray = [preferences['cacert'], process.env.SSL_CERT_FILE, process.env.NODE_EXTRA_CA_CERTS];
cacertFile = cacertArray.find(el => el); cacertFile = cacertArray.find(el => el);
if (cacertFile && cacertFile.length > 1) { if(cacertFile && cacertFile.length > 1) {
try { try {
const fs = require('fs'); const fs = require('fs');
caCrt = fs.readFileSync(cacertFile); caCrt = fs.readFileSync(cacertFile);
@ -166,7 +166,7 @@ const registerNetworkIpc = (mainWindow, watcher, lastOpenedCollections) => {
} }
} }
if (Object.keys(httpsAgentRequestFields).length > 0) { if(Object.keys(httpsAgentRequestFields).length > 0) {
request.httpsAgent = new https.Agent({ request.httpsAgent = new https.Agent({
...httpsAgentRequestFields ...httpsAgentRequestFields
}); });