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

Stop Bundlex.Output calls in runtime #127

Merged
merged 1 commit into from
Apr 18, 2024
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 lib/bundlex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ defmodule Bundlex do
"""
@spec family() :: :unix | :windows | :custom
def family() do
Platform.family(platform())
Platform.family(Platform.get_target!())
end

@doc """
Expand Down
18 changes: 8 additions & 10 deletions lib/bundlex/platform.ex
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,16 @@ defmodule Bundlex.Platform do
end

{:ok, _crosscompile} ->
def get_target!() do
case System.fetch_env("NERVES_APP") do
{:ok, _app} ->
:nerves
case System.fetch_env("NERVES_APP") do
{:ok, _app} ->
def get_target!(), do: :nerves

:error ->
Output.info(
"Cross-compiling without using Nerves. Make sure necessary environment variables are set correctly."
)
:error ->
Output.info(
"Cross-compiling without using Nerves. Make sure necessary environment variables are set correctly."
)

:custom
end
def get_target!(), do: :custom
end
end

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Bundlex.Mixfile do
use Mix.Project

@version "1.5.0"
@version "1.5.1"
@github_url "https://github.com/membraneframework/bundlex"

def project do
Expand Down
Loading