Skip to content

Commit b9e9549

Browse files
committed
Update OsSettingsResolver.cs
1 parent 7f40583 commit b9e9549

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

src/DiffEngine/OsSettingsResolver.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,21 @@ public static bool Resolve(
2626
[NotNullWhen(true)] out string? path,
2727
[NotNullWhen(true)] out LaunchArguments? launchArguments)
2828
{
29-
if (TryResolveForOs(osSupport.Windows, out path, out launchArguments, OSPlatform.Windows))
29+
if (TryResolveForOs(osSupport.Windows, out path, OSPlatform.Windows))
3030
{
31+
launchArguments = osSupport.Windows.LaunchArguments;
3132
return true;
3233
}
3334

34-
if (TryResolveForOs(osSupport.Linux, out path, out launchArguments, OSPlatform.Linux))
35+
if (TryResolveForOs(osSupport.Linux, out path, OSPlatform.Linux))
3536
{
37+
launchArguments = osSupport.Linux.LaunchArguments;
3638
return true;
3739
}
3840

39-
if (TryResolveForOs(osSupport.Osx, out path, out launchArguments, OSPlatform.OSX))
41+
if (TryResolveForOs(osSupport.Osx, out path, OSPlatform.OSX))
4042
{
43+
launchArguments = osSupport.Osx.LaunchArguments;
4144
return true;
4245
}
4346

@@ -47,12 +50,10 @@ public static bool Resolve(
4750
}
4851

4952
static bool TryResolveForOs(
50-
OsSettings? os,
53+
[NotNullWhen(true)] OsSettings? os,
5154
[NotNullWhen(true)] out string? path,
52-
[NotNullWhen(true)] out LaunchArguments? launchArguments,
5355
OSPlatform platform)
5456
{
55-
launchArguments = null;
5657
path = null;
5758

5859
if (os == null || !RuntimeInformation.IsOSPlatform(platform))
@@ -74,21 +75,18 @@ static bool TryResolveForOs(
7475
}
7576
else
7677
{
77-
launchArguments = null;
7878
path = null;
7979
return false;
8080
}
8181
if (WildcardFileFinder.TryFind(basePath, out path))
8282
{
83-
launchArguments = os.LaunchArguments;
8483
return true;
8584
}
8685
}
8786
}
8887

8988
if (TryFindExe(os.ExeName, os.SearchDirectories, out path))
9089
{
91-
launchArguments = os.LaunchArguments;
9290
return true;
9391
}
9492

0 commit comments

Comments
 (0)