Skip to content

Commit

Permalink
update: simplify diff check
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-capellari committed Mar 12, 2021
1 parent ab2c700 commit 5c38f35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ const yarn = require('./yarn');
return res;
});

const lines = diff.split('\n').filter(l => l);
core.info(`Workspace ${inputs.workspace} ${lines.length > 0 ? 'affected' : 'not affected'}`)
// Test if affected
const affected = diff.split('\n').some(l => l !== '');

if (lines.length > 0) {
if (affected) {
core.setOutput('affected', true);
core.info(`Workspace ${inputs.workspace} affected`);
} else {
Expand Down

0 comments on commit 5c38f35

Please sign in to comment.