diff --git a/lib/livebook/runtime.ex b/lib/livebook/runtime.ex index e83bde696..c1ac459b3 100644 --- a/lib/livebook/runtime.ex +++ b/lib/livebook/runtime.ex @@ -476,7 +476,7 @@ defprotocol Livebook.Runtime do Sets the given environment variables. """ @spec put_system_envs(t(), list({String.t(), String.t()})) :: :ok - def put_system_envs(runtime, env_vars) + def put_system_envs(runtime, envs) @doc """ Unsets the given environment variables. diff --git a/lib/livebook/runtime/attached.ex b/lib/livebook/runtime/attached.ex index 4036c63d2..22b228934 100644 --- a/lib/livebook/runtime/attached.ex +++ b/lib/livebook/runtime/attached.ex @@ -124,8 +124,8 @@ defimpl Livebook.Runtime, for: Livebook.Runtime.Attached do raise "not supported" end - def put_system_envs(runtime, secrets) do - RuntimeServer.put_system_envs(runtime.server_pid, secrets) + def put_system_envs(runtime, envs) do + RuntimeServer.put_system_envs(runtime.server_pid, envs) end def delete_system_envs(runtime, names) do diff --git a/lib/livebook/runtime/elixir_standalone.ex b/lib/livebook/runtime/elixir_standalone.ex index c016ad175..e5a8bfc06 100644 --- a/lib/livebook/runtime/elixir_standalone.ex +++ b/lib/livebook/runtime/elixir_standalone.ex @@ -221,8 +221,8 @@ defimpl Livebook.Runtime, for: Livebook.Runtime.ElixirStandalone do Livebook.Runtime.Dependencies.search_packages_on_hex(send_to, search) end - def put_system_envs(runtime, secrets) do - RuntimeServer.put_system_envs(runtime.server_pid, secrets) + def put_system_envs(runtime, envs) do + RuntimeServer.put_system_envs(runtime.server_pid, envs) end def delete_system_envs(runtime, names) do diff --git a/lib/livebook/runtime/embedded.ex b/lib/livebook/runtime/embedded.ex index 497ca35cd..ffb21c283 100644 --- a/lib/livebook/runtime/embedded.ex +++ b/lib/livebook/runtime/embedded.ex @@ -122,8 +122,8 @@ defimpl Livebook.Runtime, for: Livebook.Runtime.Embedded do Livebook.Runtime.Dependencies.search_packages_in_list(packages, send_to, search) end - def put_system_envs(runtime, secrets) do - RuntimeServer.put_system_envs(runtime.server_pid, secrets) + def put_system_envs(runtime, envs) do + RuntimeServer.put_system_envs(runtime.server_pid, envs) end def delete_system_envs(runtime, names) do diff --git a/lib/livebook/runtime/erl_dist/runtime_server.ex b/lib/livebook/runtime/erl_dist/runtime_server.ex index 5604cd7e9..131f70541 100644 --- a/lib/livebook/runtime/erl_dist/runtime_server.ex +++ b/lib/livebook/runtime/erl_dist/runtime_server.ex @@ -169,9 +169,9 @@ defmodule Livebook.Runtime.ErlDist.RuntimeServer do @doc """ Sets the given environment variables. """ - @spec put_system_envs(pid(), map()) :: :ok - def put_system_envs(pid, secrets) do - GenServer.cast(pid, {:put_system_envs, secrets}) + @spec put_system_envs(pid(), list({String.t(), String.t()})) :: :ok + def put_system_envs(pid, envs) do + GenServer.cast(pid, {:put_system_envs, envs}) end @doc """ @@ -476,8 +476,8 @@ defmodule Livebook.Runtime.ErlDist.RuntimeServer do {:noreply, state} end - def handle_cast({:put_system_envs, secrets}, state) do - System.put_env(secrets) + def handle_cast({:put_system_envs, envs}, state) do + System.put_env(envs) {:noreply, state} end