fix: error injection order

This commit is contained in:
Dallin Romney 2025-07-31 09:36:12 -07:00
parent 5520d5b7e4
commit 3bd00d09fd

View file

@ -486,6 +486,10 @@ export class ConfigHandler {
configLoadInterrupted,
} = await this.currentProfile.reloadConfig(this.additionalContextProviders);
if (injectErrors) {
errors.unshift(...injectErrors);
}
this.notifyConfigListeners({ config, errors, configLoadInterrupted });
this.initter.emit("init");
@ -500,10 +504,6 @@ export class ConfigHandler {
configLoadInterrupted,
});
if (injectErrors) {
errors.unshift(...injectErrors);
}
return {
config,
errors: errors.length ? errors : undefined,