Skip to content

Commit

Permalink
feat: check if data file exists in /data/ when unspecified in manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGriefs committed Oct 6, 2021
1 parent 721ab35 commit 8d64bbd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/merger.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,14 @@ async function merge(paths, options) {
);
continue;
}
const dataPath = nodePath.join(path, manifest.data_file[dataName]);
if (!fs.existsSync(dataPath)) continue;
let dataPath = nodePath.join(path, manifest.data_file[dataName]);
if (!fs.existsSync(dataPath)) {
if (!fs.existsSync((dataPath = nodePath.join(path, 'data', manifest.data_file[dataName])))) {
info(`Data path doesn't exist: ${dataPath}`);
continue;
}
info(`This resource is using an incorrect path to '${dataName}'. It has been corrected`);
}
const dataTempPath = nodePath.join(tempPath, 'data', Constants.DataFileNames[dataName]);
dataFiles.push(dataName);

Expand Down

0 comments on commit 8d64bbd

Please sign in to comment.