Skip to content

Commit

Permalink
fix: discard result of refreshAll in config watchers
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
  • Loading branch information
traeok committed Aug 29, 2024
1 parent dbf9a74 commit 3645661
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/zowe-explorer/src/shared/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,14 @@ export function watchConfigProfile(context: vscode.ExtensionContext): void {
context.subscriptions.push(...watchers);

watchers.forEach((watcher) => {
watcher.onDidCreate(async () => {
watcher.onDidCreate(() => {
ZoweLogger.info(localize("watchConfigProfile.create", "Team config file created, refreshing Zowe Explorer."));
await refreshActions.refreshAll();
void refreshActions.refreshAll();
ZoweExplorerApiRegister.getInstance().onProfilesUpdateEmitter.fire(EventTypes.CREATE);
});
watcher.onDidDelete(async () => {
watcher.onDidDelete(() => {
ZoweLogger.info(localize("watchConfigProfile.delete", "Team config file deleted, refreshing Zowe Explorer."));
await refreshActions.refreshAll();
void refreshActions.refreshAll();
ZoweExplorerApiRegister.getInstance().onProfilesUpdateEmitter.fire(EventTypes.DELETE);
});
watcher.onDidChange(async (uri: vscode.Uri) => {
Expand All @@ -260,7 +260,7 @@ export function watchConfigProfile(context: vscode.ExtensionContext): void {
return;
}
globals.setSavedProfileContents(newProfileContents);
await refreshActions.refreshAll();
void refreshActions.refreshAll();
ZoweExplorerApiRegister.getInstance().onProfilesUpdateEmitter.fire(EventTypes.UPDATE);
});
});
Expand Down

0 comments on commit 3645661

Please sign in to comment.