Skip to content

Commit ac5abec

Browse files
authored
Workaround for VersionOption initializing to null on Mono. (#41690)
2 parents f239eb4 + ae3c9af commit ac5abec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Cli/dotnet/commands/dotnet-tool/common/ToolAppliedOption.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ internal class ToolAppliedOption
1919
Description = UpdateToolsLocalizableStrings.UpdateAllOptionDescription
2020
};
2121

22-
public static readonly CliOption<string> VersionOption = ToolInstallCommandParser.VersionOption;
22+
public static readonly CliOption<string> VersionOption
23+
= ToolInstallCommandParser.VersionOption
24+
?? new("--version"); // Workaround for Mono runtime (https://github.com/dotnet/sdk/issues/41672)
2325

2426
public static CliOption<string> ToolPathOption = new("--tool-path")
2527
{

0 commit comments

Comments
 (0)