Skip to content

Commit 5461870

Browse files
Merge pull request #262 from intersystems-community/customized_export
fixes in configuration export.addCategory
2 parents c39b393 + 8e701cf commit 5461870

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/commands/export.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ const getCategory = (fileName: string, addCategory: any | boolean): string => {
2020
if (new RegExp(`^${pattern}$`).test(fileName)) {
2121
return addCategory[pattern];
2222
}
23-
if (addCategory[fileExt]) return addCategory[fileExt];
24-
if (addCategory["*"]) return addCategory["*"];
2523
}
24+
if (addCategory[fileExt]) return addCategory[fileExt];
25+
if (addCategory["*"]) return addCategory["*"];
2626
return null;
2727
}
2828
switch (fileExt) {
@@ -144,7 +144,9 @@ export async function exportList(files: string[], workspaceFolder: string, names
144144
}
145145
const { atelier, folder, addCategory } = config("export", workspaceFolder);
146146

147-
const root = [workspaceFolderUri(workspaceFolder).fsPath, folder].join(path.sep);
147+
const root = [workspaceFolderUri(workspaceFolder).fsPath, typeof folder === "string" && folder.length ? folder : null]
148+
.filter(notNull)
149+
.join(path.sep);
148150
const run = async (fileList) => {
149151
const errors = [];
150152
for (const file of fileList) {

0 commit comments

Comments
 (0)