Skip to content

chore: replace parseRawFlags with a better approach #1892

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

Closed
erezrokah opened this issue Feb 16, 2021 · 0 comments
Closed

chore: replace parseRawFlags with a better approach #1892

erezrokah opened this issue Feb 16, 2021 · 0 comments
Labels
area: command: addons area: command: sites good first issue type: chore work needed to keep the product and development running smoothly

Comments

@erezrokah
Copy link
Contributor

parseRawFlags

const parseRawFlags = function (raw) {
is used is several places in the codebase to manually parse flags passed to the CLI.
In some places it is redundant:
const noForce = !rawFlags.force && !rawFlags.f

if (!rawFlags.force && !rawFlags.f) {

And in other places it is used to to pass configuration to addons:

const missingValues = missingConfigValues(required, rawFlags)

const missingValues = missingConfigValues(required, rawFlags)

We should use the built in parsing mechanism when possible and re-visit the approach passing configuration to plugins by parsing the raw arguments ourselves.

@erezrokah erezrokah added good first issue type: chore work needed to keep the product and development running smoothly area: command: addons area: command: sites labels Feb 16, 2021
@serhalp serhalp closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: command: addons area: command: sites good first issue type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

No branches or pull requests

2 participants