From 2a3c39017a332bb96d60b856580eb12a20ebcaeb Mon Sep 17 00:00:00 2001 From: Luis Antonio Peregrina Andrade Date: Thu, 1 Apr 2021 15:32:23 -0600 Subject: [PATCH] wsl -l -q, removes header and default mark --- src/vs/workbench/contrib/terminal/node/terminalProfiles.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/node/terminalProfiles.ts b/src/vs/workbench/contrib/terminal/node/terminalProfiles.ts index a7635d63576..4dd6ca884b0 100644 --- a/src/vs/workbench/contrib/terminal/node/terminalProfiles.ts +++ b/src/vs/workbench/contrib/terminal/node/terminalProfiles.ts @@ -161,7 +161,7 @@ async function getWslProfiles(wslPath: string, useWslProfiles?: boolean): Promis if (useWslProfiles) { const distroOutput = await new Promise((resolve, reject) => { // wsl.exe output is encoded in utf16le (ie. A -> 0x4100) - cp.exec('wsl.exe -l', { encoding: 'utf16le' }, (err, stdout) => { + cp.exec('wsl.exe -l -q', { encoding: 'utf16le' }, (err, stdout) => { if (err) { return reject('Problem occurred when getting wsl distros'); } @@ -171,12 +171,7 @@ async function getWslProfiles(wslPath: string, useWslProfiles?: boolean): Promis if (distroOutput) { const regex = new RegExp(/[\r?\n]/); const distroNames = distroOutput.split(regex).filter(t => t.trim().length > 0 && t !== ''); - // don't need the Windows Subsystem for Linux Distributions header - distroNames.shift(); for (let distroName of distroNames) { - // Remove default from distro name - distroName = distroName.replace(/ \(Default\)$/, ''); - // Skip empty lines if (distroName === '') { continue;