toolbelt
toolbelt copied to clipboard
Use oclif env default for relevant flags
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
Hi @ridem, Thanks for the suggestion.
It would mean that you'll have to manually define the FOREST_PROJECT_ID in your repositories, right?
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