Skip to content

Commit

Permalink
fix: ignore some pipe errors we cannot do anything about
Browse files Browse the repository at this point in the history
  • Loading branch information
vknabel committed Apr 13, 2023
1 parent a14ead5 commit 36faf41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 1.6.3

- fix: join paths correctly on windows #21
- fix: ignore some pipe errors we cannot do anything about

# 1.6.2

Expand Down
4 changes: 3 additions & 1 deletion src/UserInteraction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export async function handleFormatError(
function matches(...codeOrStatus: Array<number | string>) {
return codeOrStatus.some(c => c === error.code || c === error.status);
}
if (matches("ENOENT", 127)) {
if (matches("ENOBUFS", "EPIPE")) {
return;
} else if (matches("ENOENT", "EACCES", 127)) {
const selection = await Current.editor.showErrorMessage(
`Could not find SwiftFormat: ${Current.config
.swiftFormatPath(document)
Expand Down

0 comments on commit 36faf41

Please sign in to comment.