[PTRun][VSCode]Support for VSCodium (#16380)

This commit is contained in:
makeProjectGreatAgain 2022-02-18 17:17:21 +03:00 committed by GitHub
parent 51aba915f0
commit f2093ec423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,14 +68,14 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.VSCodeHelper
_systemPath = Environment.GetEnvironmentVariable("PATH");
var paths = _systemPath.Split(";");
paths = paths.Where(x => x.Contains("VS Code")).ToArray();
paths = paths.Where(x => x.Contains("VS Code") || x.Contains("VSCodium")).ToArray();
foreach (var path in paths)
{
if (Directory.Exists(path))
{
var files = Directory.GetFiles(path);
var iconPath = Path.GetDirectoryName(path);
files = files.Where(x => x.Contains("code") && !x.EndsWith(".cmd")).ToArray();
files = files.Where(x => (x.Contains("code") || x.Contains("VSCodium")) && !x.EndsWith(".cmd")).ToArray();
if (files.Length > 0)
{
@ -102,6 +102,11 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.VSCodeHelper
version = "Code - Exploration";
instance.VSCodeVersion = VSCodeVersion.Exploration;
}
else if (file.EndsWith("VSCodium"))
{
version = "VSCodium";
instance.VSCodeVersion = VSCodeVersion.Stable; // ?
}
if (version != string.Empty)
{