Skip to content

Commit 27e6f1e

Browse files
committed
fix: raw action files copy
1 parent 2c43286 commit 27e6f1e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/file-utilities.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,7 @@ const FileUtilities = {
112112
FileUtilities.mergeJson(context, file);
113113
break;
114114
case 'raw':
115-
context.fs.copy(context.templatePath(file.src), context.destinationPath(file.dest), {
116-
globOptions: {
117-
noext: true
118-
}
119-
});
115+
this._copyRaw(context, file.src, file.dest);
120116
break;
121117
default:
122118
throw new Error(`Invalid action: ${file.action}`);
@@ -126,7 +122,7 @@ const FileUtilities = {
126122
} else {
127123
context.fs.copy(context.templatePath(file.src), context.destinationPath(file.dest), {
128124
globOptions: {
129-
noext: true
125+
extglob: false
130126
}
131127
});
132128
}
@@ -173,6 +169,11 @@ const FileUtilities = {
173169
_getAction(name) {
174170
const actionMatch = FileActionRegExp.exec(name);
175171
return actionMatch ? actionMatch[1] : null;
172+
},
173+
174+
_copyRaw(context, src, dest) {
175+
const rawContent = context.fs.read(context.templatePath(src), {raw: true});
176+
context.fs.write(context.destinationPath(dest), rawContent);
176177
}
177178
};
178179

0 commit comments

Comments
 (0)