Skip to content

Commit afe22a2

Browse files
author
José Valim
committed
Use nil for resetting env vars instead of false #4067
1 parent adaceb3 commit afe22a2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/elixir/lib/system.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ defmodule System do
493493

494494
defp validate_env(enum) do
495495
Enum.map enum, fn
496-
{k, false} ->
496+
{k, nil} ->
497497
{String.to_char_list(k), false}
498498
{k, v} ->
499499
{String.to_char_list(k), String.to_char_list(v)}

lib/elixir/test/elixir/system_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ defmodule SystemTest do
7070

7171
test "cmd/3 (with options)" do
7272
assert {["hello\n"], 0} = System.cmd "echo", ["hello"],
73-
into: [], cd: System.cwd!, env: %{"foo" => "bar", "baz" => false},
73+
into: [], cd: System.cwd!, env: %{"foo" => "bar", "baz" => nil},
7474
arg0: "echo", stderr_to_stdout: true, parallelism: true
7575
end
7676

0 commit comments

Comments
 (0)