diff --git a/lib/tasks/verify-javascript.js b/lib/tasks/verify-javascript.js index dd7981e6..973206dd 100644 --- a/lib/tasks/verify-javascript.js +++ b/lib/tasks/verify-javascript.js @@ -46,7 +46,7 @@ async function lint (config) { if (isCI) { results.forEach(result => { - const file = result.filePath; + const file = result.filePath.replace(config.cwd, ''); result.messages.forEach(issue => { const newLine = "%0A"; const message = issue.message.replace(/\n/g, newLine); diff --git a/test/unit/tasks/verify-javascript.test.js b/test/unit/tasks/verify-javascript.test.js index aa027288..e0ed1fe6 100644 --- a/test/unit/tasks/verify-javascript.test.js +++ b/test/unit/tasks/verify-javascript.test.js @@ -110,7 +110,7 @@ describe('verify-javascript', function() { proclaim.calledTwice(console.log); proclaim.calledWithExactly( console.log, - `::error file=/Users/jake.champion/Code/repo-data-cli/repos/origami-build-tools/test/unit/fixtures/verify/src/js/error/invalid.js,line=1,col=6,code=undefined,severity=error::Parsing error: Unexpected token test` + `::error file=/invalid.js,line=1,col=6,code=undefined,severity=error::Parsing error: Unexpected token test` ); } });