[PT RUN] [VSCodeWorkspaces] no remote ssh machines are appearing in the result list #15106 (#15107)

This commit is contained in:
ricardosantos9521
2021-12-27 18:16:43 +00:00
committed by GitHub
parent 979d3c6011
commit 7b280ebde1
2 changed files with 2 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.RemoteMachinesHelper
try
{
JsonElement vscodeSettingsFile = JsonSerializer.Deserialize<JsonElement>(fileContent);
JsonElement vscodeSettingsFile = JsonSerializer.Deserialize<JsonElement>(fileContent, new JsonSerializerOptions() { AllowTrailingCommas = true, ReadCommentHandling = JsonCommentHandling.Skip });
if (vscodeSettingsFile.TryGetProperty("remote.SSH.configFile", out var pathElement))
{
var path = pathElement.GetString();

View File

@@ -21,7 +21,7 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.SshConfigParser
public static IEnumerable<SshHost> Parse(string str)
{
str = str.Replace('\r', '\0');
str = str.Replace("\r", string.Empty);
var list = new List<SshHost>();
foreach (Match match in _sshConfig.Matches(str))
{