Skip to content

Commit

Permalink
fix skipping everything instead of single file
Browse files Browse the repository at this point in the history
  • Loading branch information
Logerfo committed Oct 25, 2019
1 parent 04156c4 commit 3ea4e6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,16 @@ async function processFiles(config) {
for (const element of changedFiles.data) {
if (!paths.includes(`${REPO_DIRECTORY}/${element.filename}`)) {
core.info(`${element.filename} is ignored. Skipping...`);
return;
continue;
}
if (!isText(element.filename)) {
core.info(`${element.filename} is not a text file. Skipping...`);
return;
continue;
}
const file = await fs.readFile(element.filename, { encoding: "utf8" });
if (file.endsWith("\n") || file.endsWith("\r")) {
core.info(`${element.filename} is not compromised. Skipping...`);
return;
continue;
}
core.info(`${element.filename} is compromised. Fixing...`);
const newFile = file.concat(getLineBreakChar(file));
Expand Down

0 comments on commit 3ea4e6f

Please sign in to comment.