       File.cd!(dest, function)
       :timer.sleep(10)
     after
-      :code.set_path(get_path)
+      true = :code.set_path(get_path)
 
       for {mod, file} <- :code.all_loaded() -- previous,
           file == [] or (is_list(file) and List.starts_with?(file, flag)) do

  def fixture_to_tmp(fixture, dest) do
    src = fixture_path(fixture)

    File.rm_rf!(dest)
    File.mkdir_p!(dest)
    File.cp_r!(src, dest)
  end

  def load_env(packages \\ []) do
    Application.ensure_all_started(:nerves_bootstrap)

    packages =
      packages

      fixture_to_tmp(package, path)
    end)

    _ = Code.require_file(Path.expand("mix.exs"))

    {:ok, _} = Nerves.Env.start()
    Nerves.Env.packages()
  end

