未验证 提交 a3ee7c96 编写于 作者: A Asher

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.
上级 d33b2d2a
......@@ -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 = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册