mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-09 20:49:12 +00:00
Disabling telemetry for mongo shell (#2195)
* Disabling telemetry for mongo shell * fix formatting issues * removed empty spaces from terminal and segregated disableTelemetry command
This commit is contained in:
@@ -135,11 +135,13 @@ export class AttachAddon implements ITerminalAddon {
|
||||
}
|
||||
|
||||
if (this._allowTerminalWrite) {
|
||||
const updatedData = this._shellHandler?.updateTerminalData(data) ?? data;
|
||||
const suppressedData = this._shellHandler?.getTerminalSuppressedData();
|
||||
const hasSuppressedData = suppressedData && suppressedData.length > 0;
|
||||
|
||||
if (!hasSuppressedData || !data.includes(suppressedData)) {
|
||||
terminal.write(data);
|
||||
const shouldNotWrite = suppressedData.filter(Boolean).some((item) => updatedData.includes(item));
|
||||
|
||||
if (!shouldNotWrite) {
|
||||
terminal.write(updatedData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user