Skip to content

Commit

Permalink
Fix erlfmt-format on Windows (#4463)
Browse files Browse the repository at this point in the history
The erlfmt executable likes POSIX paths on Windows too.
  • Loading branch information
big-r81 committed Mar 9, 2023
1 parent edded96 commit 774acb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ just-eunit:
@$(REBAR) -r eunit $(EUNIT_OPTS)

# target: erlfmt-check - Check Erlang source code formatting
erlfmt-check: export ERLFMT_PATH := $(ERLFMT)
erlfmt-check: export ERLFMT_PATH = $(ERLFMT)
erlfmt-check:
@$(PYTHON) dev\format_check.py

# target: erlfmt-format - Apply Erlang source code format standards automatically
erlfmt-format: export ERLFMT_PATH := $(ERLFMT)
erlfmt-format: export ERLFMT_PATH = $(ERLFMT)
erlfmt-format:
@$(PYTHON) dev\format_all.py

Expand Down
4 changes: 2 additions & 2 deletions dev/format_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_source_paths():
):
path = pathlib.Path(item)
if path.parent != curdir:
yield str(path.parent.joinpath("*.erl"))
yield str(path.parent.joinpath("*.erl").as_posix())
curdir = path.parent
if curdir is not None:
yield str(curdir.joinpath("*.erl"))
yield str(curdir.joinpath("*.erl").as_posix())

0 comments on commit 774acb8

Please sign in to comment.