Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundlex raises on empty native list #101

Closed
pagmerek opened this issue Nov 2, 2022 · 0 comments · Fixed by #102
Closed

Bundlex raises on empty native list #101

pagmerek opened this issue Nov 2, 2022 · 0 comments · Fixed by #102

Comments

@pagmerek
Copy link

pagmerek commented Nov 2, 2022

Description

When bundlex is invoked with empty native list then this function concatenate "\n" to the empty list.

  defp join_commands(commands, :unix) do
    Enum.map_join(commands, " && \\\n", &"(#{&1})") <> "\n"
  end

Since Elixir 1.14 Mix.shell().cmd("\n") throws an error resulting in compile error because it tries to run following script

#!/bin/sh
(
)

somehow in 1.13.4 this was not a problem

How to reproduce?

  1. Make sure you are using Elixir 1.14 or newer
  2. Initialize a project with empty native list
defmodule Example.BundlexProject do
  use Bundlex.Project

  def project() do
    [
      natives: []
    ]
  end
end
  1. Run mix compile
  2. Voila!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant