Skip to content

Commit

Permalink
Force compile user code to ensure that CA certs can be loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorRigby committed May 4, 2021
1 parent 329c024 commit 2f0bba3
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/mix/tasks/nerves_hub.ca_certificate.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ defmodule Mix.Tasks.NervesHub.CaCertificate do
]

def run(args) do
# compile the project in case we need CA certs from it
_ = Mix.Task.run("compile")
_ = Application.ensure_all_started(:nerves_hub_cli)

{opts, args} = OptionParser.parse!(args, strict: @switches)
Expand Down
2 changes: 2 additions & 0 deletions lib/mix/tasks/nerves_hub.deployment.ex
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ defmodule Mix.Tasks.NervesHub.Deployment do
]

def run(args) do
# compile the project in case we need CA certs from it
_ = Mix.Task.run("compile")
_ = Application.ensure_all_started(:nerves_hub_cli)

{opts, args} = OptionParser.parse!(args, strict: @switches)
Expand Down
2 changes: 2 additions & 0 deletions lib/mix/tasks/nerves_hub.device.ex
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ defmodule Mix.Tasks.NervesHub.Device do

@spec run([String.t()]) :: :ok | no_return()
def run(args) do
# compile the project in case we need CA certs from it
_ = Mix.Task.run("compile")
_ = Application.ensure_all_started(:nerves_hub_cli)

{opts, args} = OptionParser.parse!(args, strict: @switches)
Expand Down
2 changes: 2 additions & 0 deletions lib/mix/tasks/nerves_hub.firmware.ex
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ defmodule Mix.Tasks.NervesHub.Firmware do
]

def run(args) do
# compile the project in case we need CA certs from it
_ = Mix.Task.run("compile")
_ = Application.ensure_all_started(:nerves_hub_cli)

{opts, args} = OptionParser.parse!(args, strict: @switches)
Expand Down
2 changes: 2 additions & 0 deletions lib/mix/tasks/nerves_hub.key.ex
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ defmodule Mix.Tasks.NervesHub.Key do
]

def run(args) do
# compile the project in case we need CA certs from it
_ = Mix.Task.run("compile")
_ = Application.ensure_all_started(:nerves_hub_cli)

{opts, args} = OptionParser.parse!(args, strict: @switches)
Expand Down
2 changes: 2 additions & 0 deletions lib/mix/tasks/nerves_hub.org.ex
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ defmodule Mix.Tasks.NervesHub.Org do
]

def run(args) do
# compile the project in case we need CA certs from it
_ = Mix.Task.run("compile")
_ = Application.ensure_all_started(:nerves_hub_cli)

{opts, args} = OptionParser.parse!(args, strict: @switches)
Expand Down
2 changes: 2 additions & 0 deletions lib/mix/tasks/nerves_hub.product.ex
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ defmodule Mix.Tasks.NervesHub.Product do
]

def run(args) do
# compile the project in case we need CA certs from it
_ = Mix.Task.run("compile")
_ = Application.ensure_all_started(:nerves_hub_cli)

{opts, args} = OptionParser.parse!(args, strict: @switches)
Expand Down
2 changes: 2 additions & 0 deletions lib/mix/tasks/nerves_hub.user.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ defmodule Mix.Tasks.NervesHub.User do
@switches [path: :string]

def run(args) do
# compile the project in case we need CA certs from it
_ = Mix.Task.run("compile")
_ = Application.ensure_all_started(:nerves_hub_cli)

{opts, args} = OptionParser.parse!(args, strict: @switches)
Expand Down

0 comments on commit 2f0bba3

Please sign in to comment.