Skip to content

Commit 6ac6981

Browse files
committed
Set the default value of Create Manifest If Needed to True
This should enable the findFirst function to create a tool manifest by default. Will break some tests. On initial glance,, the arg behavior only seems to be inherited by tool install local, which is all I want to impact right now. Although it also gets inherited by the construct command in command parser.
1 parent bf4223b commit 6ac6981

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Cli/dotnet/Commands/Tool/Install/ToolInstallCommandParser.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ internal static class ToolInstallCommandParser
5151
public static readonly Option<bool> CreateManifestIfNeededOption = new("--create-manifest-if-needed")
5252
{
5353
Description = CliCommandStrings.CreateManifestIfNeededOptionDescription,
54-
Arity = ArgumentArity.Zero
54+
Arity = ArgumentArity.Zero,
55+
DefaultValueFactory = _ => true,
5556
};
5657

5758
public static readonly Option<bool> AllowPackageDowngradeOption = new("--allow-downgrade")

0 commit comments

Comments
 (0)