Skip to content

Commit

Permalink
Prevent crash when running on non-file buffer (#35)
Browse files Browse the repository at this point in the history
Sometimes flymake-eslint is started on a buffer that is not baked by a
file (e.g., *scratch*, an ediff buffer or an old version of a
git-versioned file). In this case, `buffer-file-name' returns nil
which is invalid for a command list.
  • Loading branch information
DamienCassou authored Feb 2, 2024
1 parent e30c9a1 commit c783788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flymake-eslint.el
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ argument."
,@format-args
"--stdin"
"--stdin-filename"
,(buffer-file-name source-buffer)
,(or (buffer-file-name source-buffer) (buffer-name source-buffer))
,@(flymake-eslint--executable-args))
:sentinel
(lambda (proc &rest ignored)
Expand Down

0 comments on commit c783788

Please sign in to comment.