mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[PTRun][VSCode]Support for VSCodium (#16380)
This commit is contained in:
committed by
GitHub
parent
51aba915f0
commit
f2093ec423
@@ -68,14 +68,14 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.VSCodeHelper
|
|||||||
|
|
||||||
_systemPath = Environment.GetEnvironmentVariable("PATH");
|
_systemPath = Environment.GetEnvironmentVariable("PATH");
|
||||||
var paths = _systemPath.Split(";");
|
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)
|
foreach (var path in paths)
|
||||||
{
|
{
|
||||||
if (Directory.Exists(path))
|
if (Directory.Exists(path))
|
||||||
{
|
{
|
||||||
var files = Directory.GetFiles(path);
|
var files = Directory.GetFiles(path);
|
||||||
var iconPath = Path.GetDirectoryName(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)
|
if (files.Length > 0)
|
||||||
{
|
{
|
||||||
@@ -102,6 +102,11 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.VSCodeHelper
|
|||||||
version = "Code - Exploration";
|
version = "Code - Exploration";
|
||||||
instance.VSCodeVersion = VSCodeVersion.Exploration;
|
instance.VSCodeVersion = VSCodeVersion.Exploration;
|
||||||
}
|
}
|
||||||
|
else if (file.EndsWith("VSCodium"))
|
||||||
|
{
|
||||||
|
version = "VSCodium";
|
||||||
|
instance.VSCodeVersion = VSCodeVersion.Stable; // ?
|
||||||
|
}
|
||||||
|
|
||||||
if (version != string.Empty)
|
if (version != string.Empty)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user