mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 14:31:31 +01:00
Merge pull request #94472 from microsoft/tyriar/94388
Report linux desktop-related env vars in issue reporter
This commit is contained in:
@@ -168,6 +168,13 @@ ${this.getInfos()}
|
||||
|Screen Reader|${this._data.systemInfo.screenReader}|
|
||||
|VM|${this._data.systemInfo.vmHint}|`;
|
||||
|
||||
if (this._data.systemInfo.linuxEnv) {
|
||||
md += `\n|DESKTOP_SESSION|${this._data.systemInfo.linuxEnv.desktopSession}|
|
||||
|XDG_CURRENT_DESKTOP|${this._data.systemInfo.linuxEnv.xdgCurrentDesktop}|
|
||||
|XDG_SESSION_DESKTOP|${this._data.systemInfo.linuxEnv.xdgSessionDesktop}|
|
||||
|XDG_SESSION_TYPE|${this._data.systemInfo.linuxEnv.xdgSessionType}|`;
|
||||
}
|
||||
|
||||
this._data.systemInfo.remoteData.forEach(remote => {
|
||||
if (isRemoteDiagnosticError(remote)) {
|
||||
md += `\n\n${remote.errorMessage}`;
|
||||
@@ -268,4 +275,4 @@ ${table}
|
||||
|
||||
</details>`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,55 @@ OS version: undefined
|
||||
<!-- generated by issue reporter -->`);
|
||||
});
|
||||
|
||||
test('serializes Linux environment information when data is provided', () => {
|
||||
const issueReporterModel = new IssueReporterModel({
|
||||
issueType: 0,
|
||||
systemInfo: {
|
||||
os: 'Darwin',
|
||||
cpus: 'Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800)',
|
||||
memory: '16.00GB',
|
||||
vmHint: '0%',
|
||||
processArgs: '',
|
||||
screenReader: 'no',
|
||||
remoteData: [],
|
||||
gpuStatus: {},
|
||||
linuxEnv: {
|
||||
desktopSession: 'ubuntu',
|
||||
xdgCurrentDesktop: 'ubuntu',
|
||||
xdgSessionDesktop: 'ubuntu:GNOME',
|
||||
xdgSessionType: 'x11'
|
||||
}
|
||||
}
|
||||
});
|
||||
assert.equal(issueReporterModel.serialize(),
|
||||
`
|
||||
Issue Type: <b>Bug</b>
|
||||
|
||||
undefined
|
||||
|
||||
VS Code version: undefined
|
||||
OS version: undefined
|
||||
|
||||
<details>
|
||||
<summary>System Info</summary>
|
||||
|
||||
|Item|Value|
|
||||
|---|---|
|
||||
|CPUs|Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800)|
|
||||
|GPU Status||
|
||||
|Load (avg)|undefined|
|
||||
|Memory (System)|16.00GB|
|
||||
|Process Argv||
|
||||
|Screen Reader|no|
|
||||
|VM|0%|
|
||||
|DESKTOP_SESSION|ubuntu|
|
||||
|XDG_CURRENT_DESKTOP|ubuntu|
|
||||
|XDG_SESSION_DESKTOP|ubuntu:GNOME|
|
||||
|XDG_SESSION_TYPE|x11|
|
||||
</details>Extensions: none
|
||||
<!-- generated by issue reporter -->`);
|
||||
});
|
||||
|
||||
test('serializes remote information when data is provided', () => {
|
||||
const issueReporterModel = new IssueReporterModel({
|
||||
issueType: 0,
|
||||
|
||||
Reference in New Issue
Block a user