Getting Undefined Function error while running mariaex tests

I was running the mariaex tests I was getting following error

** (UndefinedFunctionError) function Mix.Shell.cmd/2 is undefined or private. Did you mean one of: * cmd/3

but in this case it wasn’t then i passed explicitly [] and then tests starts working is this is a elixir issue or mariaex?

or I’m making a mistake

The signature of Mix.Shell.cmd/3 is

def cmd(command, options, callback)

And you’ll note that options has no default and therefore is required to be provided.

If you provide options as [] then it will default the option :env to []. It doesn’t mean that options itself has a default.

So I would say all is working according to specification.

This Pull request fixed the issue of Undefined function error in elixir 1.6

https://github.com/elixir-lang/elixir/pull/7329

2 Likes