auto_fix: true fails when there are no changes to commit
See original GitHub issue Verifying setup for ESLint…
Verified ESLint setup
Will use ESLint to check the files with extensions js
Linting and auto-fixing files in /home/runner/work/***/*** with ESLint…
ESLint found 6 errors (failure)
Changes found with Git
Committing changes
Error: Error: Command failed: git commit -am "Fix code style issues with ESLint"
/home/runner/work/_actions/wearerequired/lint-action/v1/dist/index.js:1108
throw new Error(`Exiting because of unhandled promise rejection`);
^
Error: Exiting because of unhandled promise rejection
at process.<anonymous> (/home/runner/work/_actions/wearerequired/lint-action/v1/dist/index.js:1108:8)
at process.emit (events.js:210:5)
at processPromiseRejections (internal/process/promises.js:201:33)
at processTicksAndRejections (internal/process/task_queues.js:94:32)```
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Extension not auto-fixing on Save #833
I got the upgrade to 2.0.4 (and subsequently to 2.0.5 a little bit ago) and I'm having trouble configuring ESLint to auto-fix issues...
Read more >error: Could not read from object database for commit-graph
We have a client that noticed errors in the Repocheck.log for a specific repository, but was unable to replicate the errors locally or ......
Read more >How to git commit nothing without an error?
The current answer, git diff-index --quiet HEAD (no --cached ), will not produce the correct result if there are differences only between the ......
Read more >Auto-squashing Git Commits
For my typo fix, there's no need to modify the original commit message so I can use --fixup and pass the commit that...
Read more >Automatically format and lint code with pre-commit - Interrupt
No, by default if pre-commit makes changes it will reject the commit so you can review the changes. The well-trained monkey at the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@brennanwilkes FWIW, I had success seeing that my runner actually had a modified file outside the linter directory which caused this error for me.
Enabling debug as described here: https://docs.github.com/en/actions/managing-workflow-runs/enabling-debug-logging showed me the file and I was able to
git rmand gitignore the file since it was only an “unneeded” fileWait, I don’t think so, since you haven’t commit yet. Git checkout or restore will return to the previous state of your package-lock.json file.