From 2d8cc182e107668f0b61ce4b96571f5959cd153c Mon Sep 17 00:00:00 2001 From: Artemiy Apostatov <54319739+apostaat@users.noreply.github.com> Date: Sun, 14 Sep 2025 18:19:42 +0400 Subject: [PATCH] fix: rebar3 does not work with fmt -v arguments --- modules/lang/erlang/doctor.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/lang/erlang/doctor.el b/modules/lang/erlang/doctor.el index 006832da2..6eedcf4bb 100644 --- a/modules/lang/erlang/doctor.el +++ b/modules/lang/erlang/doctor.el @@ -10,5 +10,10 @@ "This module requires (:tools tree-sitter)") (when (modulep! :editor format) - (unless (and (executable-find "rebar3") (zerop (car (doom-call-process "rebar3" "fmt" "-v")))) + (unless (executable-find "erlfmt") (warn! "Couldn't find erlfmt. Formatting will be disabled."))) + +(when (modulep! :editor format) + (unless (and (executable-find "rebar3") + (zerop (car (doom-call-process "rebar3" "format")))) + (warn! "Couldn't find rebar3 with format plugin installed (needed in Erlang module). Formatting will be disabled.")))