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

Use oclif env default for relevant flags #11

Open
ridem opened this issue Apr 17, 2019 · 2 comments
Open

Use oclif env default for relevant flags #11

ridem opened this issue Apr 17, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@ridem
Copy link

ridem commented Apr 17, 2019

This would basically mean replacing:

SomeCommand.flags = {
  projectId: flags.string({
    char: 'p',
    description: 'Forest project ID',
    required: true,
  })
};

with

SomeCommand.flags = {
  projectId: flags.string({
    char: 'p',
    description: 'Forest project ID',
    required: true,
    env: 'FOREST_PROJECT_ID'
  })
};

Usually, in the scope of one code project where the toolbelt is used, there's also only one Forest project that is tied to it

@arnaudbesnier arnaudbesnier added the enhancement New feature or request label Apr 18, 2019
@arnaudbesnier
Copy link
Member

Hi @ridem,
Thanks for the suggestion.

It would mean that you'll have to manually define the FOREST_PROJECT_ID in your repositories, right?

@ridem
Copy link
Author

ridem commented Apr 19, 2019

It would mean that I can use an ENV variable instead of the flag yes, and that the forest project ID is known and part of my environment for this project.

Not urgent at all, just something that could be helpful in the future as the toolbelt grows and might be used in a CI context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants