Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to pass array of values for envs with local runner (cli) #2448

Closed
DariuszPorowski opened this issue Mar 8, 2023 · 3 comments · Fixed by #2449 or #2504
Closed

Not possible to pass array of values for envs with local runner (cli) #2448

DariuszPorowski opened this issue Mar 8, 2023 · 3 comments · Fixed by #2449 or #2504
Labels
bug Something isn't working

Comments

@DariuszPorowski
Copy link
Contributor

Describe the bug
Not possible to pass array of values for envs with local runner. According to docs https://megalinter.io/latest/mega-linter-runner/#examples it should be supported.

To Reproduce
Steps to reproduce the behavior:

run local runner (cli):

mega-linter-runner -e 'ENABLE=MARKDOWN,YAML'

Behind the hood, the runner splits env to two different docker envs.

docker run -e ENABLE=MARKDOWN -e YAML oxsecurity/megalinter-documentation:v6

and megalinter runs only MARKDOWN linter

Expected behavior
A clear and concise description of what you expected to happen.

MARKDOWN and YAML linters shoud run both, and docker command should looks like:

docker run -e ENABLE=MARKDOWN,YAML oxsecurity/megalinter-documentation:v6

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Probably this causes the issue:

concatRepeatedArrays: true,

according to lib's doc: https://github.com/gkz/optionator#option-properties

concatRepeatedArrays is an optional boolean or tuple with boolean and options object (defaults to false) - when set to true and an option contains an array value and is repeated, the subsequent values for the flag will be appended rather than overwriting the original value - eg. option g of type [String]: -g a -g b -g c,d will result in ['a','b','c','d']

or lib's default value for aliasSeparator

https://github.com/gkz/optionator/blob/master/README.md#help-style-properties

@DariuszPorowski DariuszPorowski added the bug Something isn't working label Mar 8, 2023
@Kurt-von-Laven
Copy link
Collaborator

Duplicate of #1659. I won't close this though since we will gladly accept a PR to correct the documentation.

@echoix
Copy link
Collaborator

echoix commented Mar 8, 2023

@Kurt-von-Laven has beaten me and found the other related issue before me. Especially see the resolution here #1659 (comment)

@DariuszPorowski
Copy link
Contributor Author

@Kurt-von-Laven @echoix oh! Thank you, I tried to review some issues first and cannot find it. Used ENABLE keyword instead of DISABLE ;) Solution from #1659 works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants