We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4d689e commit a44db27Copy full SHA for a44db27
server/services/main.js
@@ -4,6 +4,7 @@ const { isEmpty } = require('lodash');
4
const fs = require('fs');
5
const util = require('util');
6
const difference = require('../utils/getObjectDiff');
7
+const { logMessage } = require('../utils');
8
9
/**
10
* Main services for config import/export.
@@ -118,6 +119,12 @@ module.exports = () => ({
118
119
}
120
121
const fileContents = await strapi.plugin('config-sync').service('main').readConfigFile(type, name);
122
+
123
+ if (!fileContents) {
124
+ strapi.log.warn(logMessage(`An empty config file '${file}' was found in the sync directory`));
125
+ return;
126
+ }
127
128
fileConfigs[`${type}.${formattedName}`] = fileContents;
129
}));
130
0 commit comments