Skip to content

Commit

Permalink
Stop Bundlex.Output calls in runtime (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
Noarkhh authored Apr 18, 2024
1 parent cea734f commit e112b06
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
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

0 comments on commit e112b06

Please sign in to comment.