Truffle: Plugin cli flags trigger unpreventable warning

Created on 11 Sep 2019  路  1Comment  路  Source: trufflesuite/truffle

Issue

Truffle plugins that that use cli flags receive them as keys in the injected config (awesome.) However they also automatically trigger a warning e.g

$ truffle run myPlugin --myOption hello
> Warning: possible unsupported (undocumented in help) command line option: --myOption

Is there any way for plugins to hook into the option checking logic?

If not is there any appetite for a PR that temporarily squelches the warning output when the truffle command name is run? e.g at core/lib/command.js L128

// TODO: Remove exception for 'truffle run' when plugin options support added. 
if (invalidOptions.length > 0 && result.name !== "run")

Expected Behavior

There are no unpreventable warnings

Environment

  • Operating System:
  • Ethereum client:
  • Truffle version (truffle version): 5.0.35
  • node version (node --version):
  • npm version (npm --version):
bug enhancement error better priority5 馃寑

Most helpful comment

If not is there any appetite for a PR that temporarily squelches the warning output [...]

I'd be into this as a stopgap solution, but I'd rather a PR that hooks into option parsing!

Good issue @cgewecke, thanks for raising it!

>All comments

If not is there any appetite for a PR that temporarily squelches the warning output [...]

I'd be into this as a stopgap solution, but I'd rather a PR that hooks into option parsing!

Good issue @cgewecke, thanks for raising it!

Was this page helpful?
0 / 5 - 0 ratings