mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-01 09:59:06 +08:00
[PTRun][VSCode]Support for VSCodium (#16380)
This commit is contained in:
parent
51aba915f0
commit
f2093ec423
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user