Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit 9120085

Browse files
author
William Li
committed
Rename to add source
1 parent 04066cb commit 9120085

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static Command ToolInstall()
3232
LocalizableStrings.ConfigFileOptionDescription,
3333
Accept.ExactlyOneArgument()),
3434
Create.Option(
35-
"--source-feed",
35+
"--add-source",
3636
LocalizableStrings.SourceFeedOptionDescription,
3737
Accept.OneOrMoreArguments()
3838
.With(name: LocalizableStrings.SourceFeedOptionName)),

src/dotnet/commands/dotnet-tool/update/ToolUpdateCommandParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static Command ToolUpdate()
2828
LocalizableStrings.ConfigFileOptionDescription,
2929
Accept.ExactlyOneArgument()),
3030
Create.Option(
31-
"--source-feed",
31+
"--add-source",
3232
LocalizableStrings.SourceFeedOptionDescription,
3333
Accept.OneOrMoreArguments()
3434
.With(name: LocalizableStrings.SourceFeedOptionName)),

test/dotnet.Tests/CommandTests/ToolInstallCommandTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ public void WhenRunWithPackageIdItShouldCreateValidShim()
8585
public void WhenRunWithPackageIdWithSourceItShouldCreateValidShim()
8686
{
8787
const string sourcePath = "http://mysouce.com";
88-
ParseResult result = Parser.Instance.Parse($"dotnet tool install -g {PackageId} --source-feed {sourcePath}");
88+
ParseResult result = Parser.Instance.Parse($"dotnet tool install -g {PackageId} --add-source {sourcePath}");
8989
AppliedOption appliedCommand = result["dotnet"]["tool"]["install"];
9090
ParseResult parseResult =
91-
Parser.Instance.ParseFrom("dotnet tool", new[] { "install", "-g", PackageId, "--source-feed", sourcePath });
91+
Parser.Instance.ParseFrom("dotnet tool", new[] { "install", "-g", PackageId, "--add-source", sourcePath });
9292

9393

9494
var toolToolPackageInstaller = CreateToolPackageInstaller(

test/dotnet.Tests/ParserTests/InstallToolParserTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void InstallToolParserCanParseSourceOption()
5555
const string expectedSourceValue = "TestSourceValue";
5656

5757
var result =
58-
Parser.Instance.Parse($"dotnet tool install -g --source-feed {expectedSourceValue} console.test.app");
58+
Parser.Instance.Parse($"dotnet tool install -g --add-source {expectedSourceValue} console.test.app");
5959

6060
var appliedOptions = result["dotnet"]["tool"]["install"];
6161
appliedOptions.ValueOrDefault<string[]>("source-feed").First().Should().Be(expectedSourceValue);
@@ -70,8 +70,8 @@ public void InstallToolParserCanParseMultipleSourceOption()
7070
var result =
7171
Parser.Instance.Parse(
7272
$"dotnet tool install -g " +
73-
$"--source-feed {expectedSourceValue1} " +
74-
$"--source-feed {expectedSourceValue2} console.test.app");
73+
$"--add-source {expectedSourceValue1} " +
74+
$"--add-source {expectedSourceValue2} console.test.app");
7575

7676
var appliedOptions = result["dotnet"]["tool"]["install"];
7777

test/dotnet.Tests/ParserTests/UpdateToolParserTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void UpdateToolParserCanParseSourceOption()
6262
const string expectedSourceValue = "TestSourceValue";
6363

6464
var result =
65-
Parser.Instance.Parse($"dotnet tool update -g --source-feed {expectedSourceValue} console.test.app");
65+
Parser.Instance.Parse($"dotnet tool update -g --add-source {expectedSourceValue} console.test.app");
6666

6767
var appliedOptions = result["dotnet"]["tool"]["update"];
6868
appliedOptions.ValueOrDefault<string[]>("source-feed").First().Should().Be(expectedSourceValue);
@@ -77,8 +77,8 @@ public void UpdateToolParserCanParseMultipleSourceOption()
7777
var result =
7878
Parser.Instance.Parse(
7979
$"dotnet tool update -g " +
80-
$"--source-feed {expectedSourceValue1} " +
81-
$"--source-feed {expectedSourceValue2} console.test.app");
80+
$"--add-source {expectedSourceValue1} " +
81+
$"--add-source {expectedSourceValue2} console.test.app");
8282

8383
var appliedOptions = result["dotnet"]["tool"]["update"];
8484

0 commit comments

Comments
 (0)