Skip to content

Commit

Permalink
Merge branch 'fix/datamodel-script-windows' into 'master'
Browse files Browse the repository at this point in the history
Bugfix for windows paths when using the system generator

See merge request asacolips-projects/foundry-mods/boilerplate!9
  • Loading branch information
asacolips committed Mar 26, 2024
2 parents 6dad929 + 7dfe5ac commit 047d19a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/generate-boilerplate-system.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ class SystemGenerator {
if (this.dataModel) {
const dataModelFiles = globSync('src/datamodels/*');
dataModelFiles.forEach(source => {
fs.cpSync(source, `build/${this.packageName}/${source.replace('src/datamodels/', '')}`, {recursive: true, force: true}, (err) => {
const dest = source.replaceAll('\\', '/').replace('src/datamodels/', '');
fs.cpSync(source, `build/${this.packageName}/${dest}`, {recursive: true, force: true}, (err) => {
if (err) throw err;
});
});
Expand Down

0 comments on commit 047d19a

Please sign in to comment.