Archived
1
0

Add telemetry and option to disable (#519)

* Add telemetry and option to disable

* Update readme and getting-started guide

* Update lockfile

* Update getting started guide
This commit is contained in:
Kyle Carberry
2019-04-17 17:18:35 -05:00
committed by GitHub
parent cc8c7e2cee
commit c3a38e3fea
9 changed files with 219 additions and 24 deletions

View File

@ -29,6 +29,7 @@ commander.version(process.env.VERSION || "development")
.option("-N, --no-auth", "Start without requiring authentication.", undefined)
.option("-H, --allow-http", "Allow http connections.", false)
.option("-P, --password <value>", "Specify a password for authentication.")
.option("--disable-telemetry", "Disables ALL telemetry.", false)
.option("--install-extension <value>", "Install an extension by its ID.")
.option("--bootstrap-fork <name>", "Used for development. Never set.")
.option("--extra-args <args>", "Used for development. Never set.")
@ -52,6 +53,7 @@ const bold = (text: string | number): string | number => {
readonly allowHttp: boolean;
readonly host: string;
readonly port: number;
readonly disableTelemetry: boolean;
readonly userDataDir?: string;
readonly extensionsDir?: string;
@ -68,6 +70,10 @@ const bold = (text: string | number): string | number => {
readonly extraArgs?: string;
};
if (options.disableTelemetry) {
process.env.DISABLE_TELEMETRY = "true";
}
// Commander has an exception for `--no` prefixes. Here we'll adjust that.
// tslint:disable-next-line:no-any
const noAuthValue = (commander as any).auth;

View File

@ -92,6 +92,7 @@ export class SharedProcess {
env: {
VSCODE_ALLOW_IO: "true",
VSCODE_LOGS: process.env.VSCODE_LOGS,
DISABLE_TELEMETRY: process.env.DISABLE_TELEMETRY,
},
}, this.userDataDir);
this.activeProcess = activeProcess;