Skip to content

Elixir silently removes exclamation marks and reports no such file (Windows 10) #13165

@robss2020

Description

@robss2020

Elixir and Erlang/OTP versions

Erlang/OTP 26 [erts-14.1.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]

Elixir 1.15.7 (compiled with Erlang/OTP 26)

Operating system

Windows 10

Current behavior

Exclamation marks are silently removed from filenames, although they are allowed characters in Windows, and an error is reported.

To reproduce: save IO.puts("Hello, world!") as "hello world!.exs" and execute it with:
elixir "hello world!.exs"
It will fail with "no file named hello world.exs" (silently removing the exclamation mark). Also works without quotation marks as a single word (helloworld!.exs).

C:\test>elixir "hello world!.exs"
No file named hello world.exs

image

image

Expected behavior

If it is legal in the operating system it should be accepted as an input file, or at least the error message should say "! is not allowed in filename" if it can't be run for some reason.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions