From 1a95e0dde4ed6abbd04cd9377d586618b5541792 Mon Sep 17 00:00:00 2001 From: fap <459631+fapdash@users.noreply.github.com> Date: Fri, 23 Aug 2024 13:09:58 +0200 Subject: [PATCH] Don't throw error from flutter-l10n-flycheck workdir function Throwing an error from the working-directory function leads to freezes in buffers that produce an error. `(flutter-project-get-root)` throws an error when the project is not a flutter project. This change fixes the freezes experienced in `dart-mode` buffers for files that are not part of a flutter project. --- flutter-l10n-flycheck.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flutter-l10n-flycheck.el b/flutter-l10n-flycheck.el index 7345fb9..9684a01 100644 --- a/flutter-l10n-flycheck.el +++ b/flutter-l10n-flycheck.el @@ -44,7 +44,7 @@ :command ("flutter" "packages" "pub" "run" "intl_translation:extract_to_arb" source) - :working-directory (lambda (_) (flutter-project-get-root)) + :working-directory (lambda (_) (ignore-errors (flutter-project-get-root))) :modes (dart-mode) :enabled flutter-l10n-flycheck--enable-p :error-patterns