elixir-temp
elixir-temp copied to clipboard
The Temp.open function doesn't handle binary data
data = <<255, 0, 255>>
path = Temp.open!("demo", &IO.write(&1, data))
results in
** (ErlangError) Erlang error: :no_translation
(stdlib 3.15) :io.put_chars(#PID<0.241.0>, :unicode, <<255, 0, 255>>)
(elixir 1.12.0) lib/file.ex:1421: File.open/3
(temp 0.4.7) lib/temp.ex:108: Temp.open/2
(temp 0.4.7) lib/temp.ex:127: Temp.open!/2