Skip to content

Commit

Permalink
remove envs from workspace.jsonc#generators.envs when they got remove…
Browse files Browse the repository at this point in the history
…d by "bit remove" (#8829)
  • Loading branch information
davidfirst authored Apr 25, 2024
1 parent 233016b commit 26d695b
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions scopes/harmony/config/workspace-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,18 @@ export class WorkspaceConfig implements HostConfig {
}

removeExtension(extId: string): boolean {
if (!this.raw[extId]) return false;
delete this.raw[extId];
this.loadExtensions();
return true;
if (this.raw[extId]) {
delete this.raw[extId];
this.loadExtensions();
return true;
}
const generatorEnvs = this.raw?.['teambit.generator/generator']?.envs;
if (generatorEnvs && generatorEnvs.includes(extId)) {
generatorEnvs.splice(generatorEnvs.indexOf(extId), 1);
this.loadExtensions();
return true;
}
return false;
}

/**
Expand Down

0 comments on commit 26d695b

Please sign in to comment.