Skip to content

Commit

Permalink
Make context switch listeners even more best-effort (#2182)
Browse files Browse the repository at this point in the history
* Make context switch listeners even more best-effort

* Prep 1.4.1
  • Loading branch information
bwateratmsft authored Jul 22, 2020
1 parent 5317a18 commit 754fd61
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.4.1 - 22 July 2020
### Fixed
* "Permission denied" issue during extension activation. [#2181](https://github.com/microsoft/vscode-docker/issues/2181)

## 1.4.0 - 22 July 2020
### Added
* Support for Azure Container Instances Docker contexts. [#2102](https://github.com/microsoft/vscode-docker/issues/2102)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vscode-docker",
"version": "1.4.0",
"version": "1.4.1",
"publisher": "ms-azuretools",
"displayName": "Docker",
"description": "Makes it easy to create, manage, and debug containerized applications.",
Expand Down
16 changes: 10 additions & 6 deletions src/docker/ContextManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,17 @@ export class DockerContextManager implements ContextManager, Disposable {
// The file watchers are not strictly necessary; they serve to help the extension detect context switches
// that are done in CLI. Worst case, a user would have to restart VSCode.
/* eslint-disable @typescript-eslint/tslint/config */
if (fse.existsSync(dockerConfigFile)) {
this.configFileWatcher = fs.watch(dockerConfigFile, async () => this.refresh());
}
try {
if (fse.existsSync(dockerConfigFile)) {
this.configFileWatcher = fs.watch(dockerConfigFile, async () => this.refresh());
}
} catch { } // Best effort

if (fse.existsSync(dockerContextsFolder)) {
this.contextFolderWatcher = fs.watch(dockerContextsFolder, async () => this.refresh());
}
try {
if (fse.existsSync(dockerContextsFolder)) {
this.contextFolderWatcher = fs.watch(dockerContextsFolder, async () => this.refresh());
}
} catch { } // Best effort
/* eslint-enable @typescript-eslint/tslint/config */
}

Expand Down

0 comments on commit 754fd61

Please sign in to comment.