mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-28 13:15:25 +00:00
Document workspace and folder behavior
Also fixed a type issue.
This commit is contained in:
parent
a5c35af81b
commit
3b39482420
@ -261,7 +261,7 @@ index 2c64061da7..c0ef8faedd 100644
|
||||
// Do nothing. If we can't read the file we have no
|
||||
// language pack config.
|
||||
diff --git a/src/vs/code/browser/workbench/workbench.ts b/src/vs/code/browser/workbench/workbench.ts
|
||||
index 45f6f17ce0..102289c147 100644
|
||||
index 45f6f17ce0..546b4c24de 100644
|
||||
--- a/src/vs/code/browser/workbench/workbench.ts
|
||||
+++ b/src/vs/code/browser/workbench/workbench.ts
|
||||
@@ -16,6 +16,7 @@ import product from 'vs/platform/product/common/product';
|
||||
@ -306,14 +306,14 @@ index 45f6f17ce0..102289c147 100644
|
||||
const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents } = JSON.parse(configElementAttribute);
|
||||
|
||||
+ // Strip the protocol from the authority if it exists.
|
||||
+ const normalizeAuthority = (authority?: string): string => authority && authority.replace(/^https?:\/\//, "");
|
||||
+ const normalizeAuthority = (authority: string): string => authority.replace(/^https?:\/\//, "");
|
||||
+ if (config.remoteAuthority) {
|
||||
+ (config as any).remoteAuthority = normalizeAuthority(config.remoteAuthority);
|
||||
+ }
|
||||
+ if (config.workspaceUri) {
|
||||
+ if (config.workspaceUri && config.workspaceUri.authority) {
|
||||
+ config.workspaceUri.authority = normalizeAuthority(config.workspaceUri.authority);
|
||||
+ }
|
||||
+ if (config.folderUri) {
|
||||
+ if (config.folderUri && config.folderUri.authority) {
|
||||
+ config.folderUri.authority = normalizeAuthority(config.folderUri.authority);
|
||||
+ }
|
||||
+
|
||||
|
@ -104,6 +104,15 @@ demand and will work on it when the time is right.
|
||||
Use the `--disable-telemetry` flag to completely disable telemetry. We use the
|
||||
data collected only to improve code-server.
|
||||
|
||||
## How does code-server decide what workspace or folder to open?
|
||||
|
||||
code-server tries the following in order:
|
||||
|
||||
1. The `workspace` query parameter.
|
||||
2. The `folder` query parameter.
|
||||
3. The directory passed on the command line.
|
||||
4. The last opened workspace or folder.
|
||||
|
||||
## Enterprise
|
||||
|
||||
Visit [our enterprise page](https://coder.com) for more information about our
|
||||
|
Loading…
Reference in New Issue
Block a user