From 0dfd68666122401a5ed4d5cbcbd2e69d88e8d928 Mon Sep 17 00:00:00 2001 From: Alexandre Hamez Date: Sun, 17 Jan 2021 09:47:10 +0100 Subject: [PATCH] Expand output path when generating files --- CHANGELOG | 1 + lib/mix/tasks/protox/generate.ex | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index d02550fc..24f320a6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ * x.x.x - Allow namespaces through protox.generate (thanks to https://github.com/sdrew) + - Expand output path when generating files * 1.2.4 - Fix warning when compiling generated code (thanks to https://github.com/xinz) diff --git a/lib/mix/tasks/protox/generate.ex b/lib/mix/tasks/protox/generate.ex index e3b65309..2ef43926 100644 --- a/lib/mix/tasks/protox/generate.ex +++ b/lib/mix/tasks/protox/generate.ex @@ -39,7 +39,13 @@ defmodule Mix.Tasks.Protox.Generate do {multiple_files, opts} = Keyword.pop(opts, :multiple_files, false) files - |> Protox.generate_module_code(output_path, multiple_files, include_path, namespace, opts) + |> Protox.generate_module_code( + Path.expand(output_path), + multiple_files, + include_path, + namespace, + opts + ) |> Enum.each(&generate_file/1) else err ->