You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, the project doesn't support environment variables for parameterizing the CLI's behavior. This can result in frustrating conditional construction of CLI invocations littered through more complex toolchains. For instance, our linting code has to call:
if [[ -n"${GITHUB_ACTIONS-}" ]];then
npx @redocly/cli lint --format=github-actions
else
npx @redocly/cli lint
fi
Describe the solution you'd like
A standard pattern would be to support prefixed environment variables directly mapping to your CLI args. The CLI arg library this project uses supports this very feature. Thus, a minimal change to your application -- e.g. .env("REDOCLY_CLI") -- would permit easier cross-cutting parameterization for clients like REDOCLY_CLI_OUTPUT_FORMAT=github-actions.
I'm happy to open up this PR if it seems like something the project would welcome.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, the project doesn't support environment variables for parameterizing the CLI's behavior. This can result in frustrating conditional construction of CLI invocations littered through more complex toolchains. For instance, our linting code has to call:
Describe the solution you'd like
A standard pattern would be to support prefixed environment variables directly mapping to your CLI args. The CLI arg library this project uses supports this very feature. Thus, a minimal change to your application -- e.g.
.env("REDOCLY_CLI")
-- would permit easier cross-cutting parameterization for clients likeREDOCLY_CLI_OUTPUT_FORMAT=github-actions
.I'm happy to open up this PR if it seems like something the project would welcome.
The text was updated successfully, but these errors were encountered: