mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-27 20:55:25 +00:00
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.
This commit is contained in:
parent
d33b2d2af9
commit
a3ee7c96a0
@ -490,7 +490,7 @@ export class MainServer extends Server {
|
|||||||
const locale = environment.args.locale || await getLocaleFromConfig(environment.userDataPath);
|
const locale = environment.args.locale || await getLocaleFromConfig(environment.userDataPath);
|
||||||
const cwd = process.env.VSCODE_CWD || process.cwd();
|
const cwd = process.env.VSCODE_CWD || process.cwd();
|
||||||
const workspacePath = parsedUrl.query.workspace as string | undefined;
|
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 remoteAuthority = request.headers.host as string;
|
||||||
const transformer = getUriTransformer(remoteAuthority);
|
const transformer = getUriTransformer(remoteAuthority);
|
||||||
const options: Options = {
|
const options: Options = {
|
||||||
|
Loading…
Reference in New Issue
Block a user