jelly-beam / rebar3_ex_doc

rebar3 plugin for generating docs with ex_doc
Apache License 2.0
43 stars 13 forks source link

output option is negated in config per presedence of hard coded switch option. #54

Closed starbelly closed 1 year ago

starbelly commented 1 year ago

The regression is happening because we're specifying output twice, once here :

https://github.com/starbelly/rebar3_ex_doc/blob/026741dba8a3524232709ca87eb7b4b3c2098d8e/src/rebar3_ex_doc.erl#L207

The switch will take precedence over what's in rebar.config. We need to omit the switch if it's in config. We also need to give a healthy warning if both are specified, specifically if --output foo (not the default directory) is defined and the output option is also defined in rebar.config.

Tests should be added.

weiss commented 1 year ago

We also need to give a healthy warning if both are specified

I'd argue that this part is unnecessary, at least to me it seems to be common/expected behavior to silently override some environment variable or configuration file setting on the command line.

starbelly commented 1 year ago

That's fair. I guess I think about it like, if we can save someone some time and pain, then we should.