Skip to content

Commit 0fe772c

Browse files
add case for no extension
1 parent eb07474 commit 0fe772c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@ async function processOutputPath(output, configPath) {
2626
if (configPath !== '' ) {
2727

2828
[config_type, content] = await fileAnalyzer(configPath, workspace);
29-
console.log(`Config type: ${config_type}`);
3029

3130
if (config_type !== '') {
3231
resultsFileName = content["output-name"] || '';
32+
if (resultsFileName !== '') {
33+
// if the output file name does not have an extension, add .json
34+
if (!resultsFileName.includes('.')) {
35+
resultsFileName = resultsFileName + ".json";
36+
}
37+
}
3338
}
3439
}
3540

0 commit comments

Comments
 (0)