Skip to content

Commit 1add072

Browse files
committed
fix executable output escape ANSI escape codes in bin_version/0 (#134)
1 parent e8e2891 commit 1add072

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/tailwind.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ defmodule Tailwind do
170170

171171
with true <- File.exists?(path),
172172
{out, 0} <- System.cmd(path, ["--help"]),
173+
out <- Regex.replace(~r/(\x9B|\x1B\[)[0-?]*[ -\/]*[@-~]/, out, ""),
173174
[vsn] <- Regex.run(~r/tailwindcss v([^\s]+)/, out, capture: :all_but_first) do
174175
{:ok, vsn}
175176
else

0 commit comments

Comments
 (0)