diff options
Diffstat (limited to 'tw/home/files/emacs-packages')
-rw-r--r-- | tw/home/files/emacs-packages/actionlint.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tw/home/files/emacs-packages/actionlint.el b/tw/home/files/emacs-packages/actionlint.el index 64c90bd5..68a25c57 100644 --- a/tw/home/files/emacs-packages/actionlint.el +++ b/tw/home/files/emacs-packages/actionlint.el @@ -131,7 +131,9 @@ Any running invocations are killed before running another one." (defun actionlint-github-workflow-p () "Does the current buffer contain a GitHub Action?" - (string-match-p (rx ".github/workflows/" (+ (not ?\/)) ".yml" eos) (buffer-file-name))) + (let ((name (buffer-file-name))) + (and name (string-match-p + (rx ".github/workflows/" (+ (not ?\/)) ".yml" eos) name)))) (defun actionlint-setup () "Set up actionlint in this buffer, if it is recognised as a workflow file." |