From a3ee7c96a06d034e5fc107022fd04ecfb2e7b5da Mon Sep 17 00:00:00 2001 From: Asher Date: Tue, 27 Aug 2019 14:26:54 -0500 Subject: [PATCH] Don't open cwd by default Fixes #889. Previous it would use the cwd. In some cases that's the path of where the binary is located which is a weird place to open. --- src/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.ts b/src/server.ts index c7214d21..aa3dac64 100644 --- a/src/server.ts +++ b/src/server.ts @@ -490,7 +490,7 @@ export class MainServer extends Server { const locale = environment.args.locale || await getLocaleFromConfig(environment.userDataPath); const cwd = process.env.VSCODE_CWD || process.cwd(); const workspacePath = parsedUrl.query.workspace as string | undefined; - const folderPath = !workspacePath ? parsedUrl.query.folder as string | undefined || this.options.folderUri || cwd: undefined; + const folderPath = !workspacePath ? parsedUrl.query.folder as string | undefined || this.options.folderUri : undefined; const remoteAuthority = request.headers.host as string; const transformer = getUriTransformer(remoteAuthority); const options: Options = {