From d3f6be602e456c19f762d0db043ec9f31ee8453a Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Mon, 17 May 2021 17:58:18 -0700 Subject: [PATCH] fix: finding babel config files with @babel/eslint-parser (#207) Fixes: https://github.com/standard/vscode-standard/issues/100 --- server/src/server.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/server/src/server.ts b/server/src/server.ts index 13359027..cc2bc226 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -985,17 +985,15 @@ function validate ( } ], function (err: any, _results: any) { + if (cwd !== process.cwd()) { + process.chdir(cwd) + } if (err != null) { return console.log(err) } } ) - } catch { - } finally { - if (cwd !== process.cwd()) { - process.chdir(cwd) - } - } + } catch {} } let noConfigReported: Map = new Map<