The Nerves framework is hijacking the output of every mix task and injects the Nerves environment text. This prepends text to every mix command, which can be a problem for mix commands in which the user relies on the output of the command (e.g. the code formatter).
To test run cat rel/config.exs | mix format -
The output of this command is what used by some editors to get the formatted output of the file and replace the content, resulting in syntax errors.
Another use case comes to mind is mix phx.gen.secret:
Expected behavior
Only output of specific tasks such as mix firmware, mix firmware.push or mix compile should be modified instead of all mix tasks.
I can see how this can be thought of as a code formatter bug instead, but since it is affecting the usage of all mix tasks, I thought I'd bring it up here first to see if that's something you'd want to fix on Nerves' side.
Environment
Current behavior
The Nerves framework is hijacking the output of every mix task and injects the Nerves environment text. This prepends text to every mix command, which can be a problem for mix commands in which the user relies on the output of the command (e.g. the code formatter).
To test run
cat rel/config.exs | mix format -
The output of this command is what used by some editors to get the formatted output of the file and replace the content, resulting in syntax errors.
Another use case comes to mind is
mix phx.gen.secret
:Expected behavior
Only output of specific tasks such as
mix firmware
,mix firmware.push
ormix compile
should be modified instead of all mix tasks.I can see how this can be thought of as a code formatter bug instead, but since it is affecting the usage of all mix tasks, I thought I'd bring it up here first to see if that's something you'd want to fix on Nerves' side.
Thanks!