[PTRun][VSCode]Detect portable installations of VS Code (#17749)

* Make launcher detect portable installations of VS Code in system PATH

This should fix #13362

* Move closing parenthesis

* remove trailing whitespace characters
This commit is contained in:
harvastum
2022-04-20 18:28:15 +02:00
committed by GitHub
parent 032c917493
commit b5aa55d172

View File

@@ -74,7 +74,10 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.VSCodeHelper
{ {
Instances = new List<VSCodeInstance>(); Instances = new List<VSCodeInstance>();
paths = paths.Where(x => x.Contains("VS Code") || x.Contains("VSCodium")).ToList(); paths = paths.Where(x =>
x.Contains("VS Code", StringComparison.OrdinalIgnoreCase) ||
x.Contains("VSCodium", StringComparison.OrdinalIgnoreCase) ||
x.Contains("vscode", StringComparison.OrdinalIgnoreCase)).ToList();
foreach (var path in paths) foreach (var path in paths)
{ {
if (Directory.Exists(path)) if (Directory.Exists(path))