diff --git a/src/action.js b/src/action.js index cd68d9a..0d83437 100644 --- a/src/action.js +++ b/src/action.js @@ -92,8 +92,12 @@ async function getChangedFiles(token) { if (doCheck && exitCode === 0) { const changedFiles = await getChangedFiles(token); console.log(`Number of files changed: ${changedFiles.length}`); - console.log('Running Code Limit...'); - exitCode = await exec(filename, ['check'].concat(changedFiles), {ignoreReturnCode: true}); + if (changedFiles.length === 0) { + console.log('No files changed, skipping Code Limit'); + } else { + console.log('Running Code Limit...'); + exitCode = await exec(filename, ['check'].concat(changedFiles), {ignoreReturnCode: true}); + } } fs.unlinkSync(filename); console.log('Done!');