Also try to load cli options locally (#4455)
This commit is contained in:
parent
2cd75d772c
commit
617d7d2f1d
|
|
@ -16,6 +16,16 @@ export async function registerPluginOptions(yargsInstance, plugins) {
|
|||
if (plugin && typeof plugin.getCliOptions === 'function') {
|
||||
const options = plugin.getCliOptions();
|
||||
yargsInstance.options(options);
|
||||
} else {
|
||||
try {
|
||||
const plugin = await import(pluginName);
|
||||
if (plugin && typeof plugin.getCliOptions === 'function') {
|
||||
const options = plugin.getCliOptions();
|
||||
yargsInstance.options(options);
|
||||
}
|
||||
} catch {
|
||||
// Swallow this silent
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
// Swallow this silent
|
||||
|
|
|
|||
Loading…
Reference in New Issue