Skip to content

Commit 42e3e23

Browse files
kubajanuszdanielpalme
authored andcommitted
fix: use relative path also for reports
1 parent 8d9e48a commit 42e3e23

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/reportgenerator.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ async function run() {
7878
let targetdir = (core.getInput('targetdir') || '');
7979
let historydir = (core.getInput('historydir') || '');
8080
let sourcedirs = (core.getInput('sourcedirs') || '');
81+
let reports = (core.getInput('reports') || '');
8182

8283
if (workingdir.length > 0) {
8384
if (targetdir.length > 0 && !path.isAbsolute(targetdir)) {
@@ -103,10 +104,27 @@ async function run() {
103104

104105
sourcedirs = updatedSourcedirs;
105106
}
107+
if (reports.length > 0) {
108+
let updatedReports = '';
109+
110+
reports.split(/[,;]/).forEach(report => {
111+
if (!path.isAbsolute(report)) {
112+
report = path.join(workingdir, report);
113+
}
114+
115+
if (updatedReports.length > 0) {
116+
updatedReports += ';';
117+
}
118+
119+
updatedReports += report;
120+
});
121+
122+
reports = updatedReports;
123+
}
106124
}
107125

108126
const args = [
109-
'-reports:' + (core.getInput('reports') || ''),
127+
'-reports:' + reports,
110128
'-targetdir:' + targetdir,
111129
'-reporttypes:' + (core.getInput('reporttypes') || ''),
112130
'-sourcedirs:' + sourcedirs,

0 commit comments

Comments
 (0)