Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
jobs:
test:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
env:
MIX_ENV: test
strategy:
Expand Down
16 changes: 15 additions & 1 deletion lib/esbuild.ex
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ defmodule Esbuild do

opts = [
cd: config[:cd] || File.cwd!(),
env: config[:env] || %{},
env: normalize_env(config[:env] || %{}),
into: IO.stream(:stdio, :line),
stderr_to_stdout: true
]
Expand Down Expand Up @@ -324,4 +324,18 @@ defmodule Esbuild do
end
end
end

defp normalize_env(env) do
Map.new(env, fn
{key, value} when is_list(value) -> {key, Enum.join(value, path_sep())}
other -> other
end)
end

defp path_sep do
case :os.type() do
{:win32, _} -> ";"
{:unix, _} -> ":"
end
end
end