Skip to content

Commit

Permalink
Fix error notifications appearing for missing Python config file (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
SchoofsKelvin committed Apr 16, 2023
1 parent 5314e21 commit d878b78
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
- Added a flag `OPENSSH-SHA1` (enabled by default) to pass this `convertSha1` flag when using `publickey` or `agent` auths
- Part of this change required creating a custom ssh2 `authHandler` (based on the built-in version) to pass the option if desired
- Changed the `lastVersion` extension version tracking to a new `versionHistory` system to better track bug origins
- Fix error notifications appearing for missing Python config file (#379)
- The `FS_NOTIFY_ERRORS` flag was supposed to default to `'write'` for VS Code 1.56+ but defaulted to `true` (i.e. `'all'`) instead
- Added `/pyproject.toml` to the ignore list (added as a `configBasedExtensionTips` in `product.json` in VS Code 1.77)

## v1.26.0 (2023-03-25)

Expand Down
6 changes: 3 additions & 3 deletions src/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ import { catchingPromise } from './utils';
- A comma-separated list of method names to enable logging for in the FileSystemRouter
- The presence of `all` is equal to `stat,readDirectory,createDirectory,readFile,writeFile,delete,rename`
- The router logs handles `ssh://`, and will even log operations to non-existing configurations/connections
FS_NOTIFY_ERRORS (string) (default='')
FS_NOTIFY_ERRORS (string)
- A comma-separated list of operations to display notifications for should they error
- Mind that `FileNotFound` errors for ignored paths are always ignored, except with `DEBUG_FS=showignored`
- The presence of `all` will show notification for every operation
- The presence of `write` is equal to `createDirectory,writeFile,delete,rename`
- Besides those provided by `write`, there's also `readDirectory`, `readFile` and `stat`
- Automatically set to `write` for VS Code 1.56 and later (see issue #282)
- Automatically set to `write` for VS Code 1.56 and later (see issue #282), otherwise ''
SHELL_CONFIG (string)
- Forces the use of a specific shell configuration. Check shellConfig.ts for possible values
- By default, when this flag is absent (or an empty or not a string), the extension will try to detect the correct type to use
Expand Down Expand Up @@ -104,7 +104,7 @@ function calculateFlags(): Record<string, FlagCombo> {
// Starting with 1.56, FileSystemProvider errors aren't shown to the user and just silently fail
// https://github.com/SchoofsKelvin/vscode-sshfs/issues/282
if (semver.gte(vscode.version, '1.56.0')) {
applyList(['+FS_NOTIFY_ERRORS'], 'Fix for issue #282');
applyList(['FS_NOTIFY_ERRORS=write'], 'Fix for issue #282');
}
applyList(config.globalValue, 'Global Settings');
applyList(config.workspaceValue, 'Workspace Settings');
Expand Down
1 change: 1 addition & 0 deletions src/sshFileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const IGNORE_NOT_FOUND: string[] = [
'/app/src/main/AndroidManifest.xml',
'/build.gradle',
'/.devcontainer/devcontainer.json',
'/pyproject.toml',
];
function shouldIgnoreNotFound(target: string) {
if (IGNORE_NOT_FOUND.some(entry => entry === target || entry.endsWith('/') && target.startsWith(entry))) return true;
Expand Down

0 comments on commit d878b78

Please sign in to comment.