Skip to content

Commit 9e2646e

Browse files
authored
Merge pull request #286524 from microsoft/tyriar/286138
Simplify wsl profile detection regex
2 parents ff1effc + 5ba5b2f commit 9e2646e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/vs/platform/terminal/node/terminalProfiles.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,7 @@ async function getWslProfiles(wslPath: string, defaultProfileName: string | unde
359359
if (!distroOutput) {
360360
return [];
361361
}
362-
const regex = new RegExp(/[\r?\n]/);
363-
const distroNames = distroOutput.split(regex).filter(t => t.trim().length > 0 && t !== '');
362+
const distroNames = distroOutput.split(/\r?\n/).filter(t => t.trim().length > 0);
364363
for (const distroName of distroNames) {
365364
// Skip empty lines
366365
if (distroName === '') {

0 commit comments

Comments
 (0)