Skip to content

mix do fails when one of the tasks has a comma in it #4861

@lpil

Description

@lpil

Debian 9 Linux
Elixir 1.3.0

As of Elixir v1.3 mix do incorrectly parses arguments when a task contains a comma.

Example:

mix do run -e "[1, 2]"

Before this was interpreted as one task (run -e "[1, 2]"), but now it is incorrectly interpreted as 2 (run -e "[1 and 2]), which is a syntax error.

louis ~/tmp/foo $ mix do run -e "[1, 2]"
Compiling 1 file (.ex)
Generated foo app
** (TokenMissingError) nofile:1: missing terminator: ] (for "[" starting at line 1)
    (elixir) lib/code.ex:168: Code.eval_string/3
    (elixir) lib/enum.ex:651: Enum."-each/2-lists^foreach/1-0-"/2
    (elixir) lib/enum.ex:651: Enum.each/2
    (mix) lib/mix/tasks/run.ex:67: Mix.Tasks.Run.run/1
    (mix) lib/mix/task.ex:296: Mix.Task.run_task/3
    (elixir) lib/enum.ex:651: Enum."-each/2-lists^foreach/1-0-"/2

I've been unable to find ways to escape the comma in the code literal here.

Thanks,
Louis

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions