source env/local.env
mix cmd --app snitch_core mix elasticsearch.build products --cluster Snitch.Tools.ElasticsearchCluster
, I get following error to be seen in the terminal screenshot ** (Mix) Index products could not be created.
%Elasticsearch.Exception{col: nil, line: nil, message: "Invalid alias name [products], an index exists with the same name as the alias", query: nil, raw: %{"error" => %{"index" => "products", "index_uuid" => "8frt-VY8RdOgqj7Xsb912A", "reason" => "Invalid alias name [products], an index exists with the same name as the alias", "root_cause" => [%{"index" => "products", "index_uuid" => "8frt-VY8RdOgqj7Xsb912A", "reason" => "Invalid alias name [products], an index exists with the same name as the alias", "type" => "invalid_alias_name_exception"}], "type" => "invalid_alias_name_exception"}, "status" => 400}, status: 400, type: "invalid_alias_name_exception"}
base_url <> get_image(name, struct, version)
. base_url is defined several lines above that : base_url = System.get_env("BACKEND_URL")
. Now, if you look at your env/local.env file, the environment variable "BACKEND_URL" is not defined. So even if you source it, it does not respond with a valid variable value and so you get the message that there is an argument error. Just define the variable, source the file, and everything should work fine (it did with me).