From 15938b553646211c53ae376ab1c957a6caa6eaa0 Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Tue, 28 Feb 2017 17:18:08 -0800 Subject: [PATCH 01/30] Update LocalizableStrings.cs --- .../dotnet-add-package/LocalizableStrings.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.cs b/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.cs index 21f84fe76..af46e172f 100644 --- a/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.cs @@ -9,21 +9,21 @@ namespace Microsoft.DotNet.Tools.Add.PackageReference public const string AppDescription = "Command to add package reference"; - public const string CmdPackageDescription = "Package references to add"; + public const string CmdPackageDescription = "The package reference to add."; - public const string SpecifyExactlyOnePackageReference = "Please specify one package reference to add."; + public const string SpecifyExactlyOnePackageReference = "Please specify only one package reference to be added."; - public const string CmdFrameworkDescription = "Add reference only when targetting a specific framework"; + public const string CmdFrameworkDescription = "Adds reference only when targetting a specific framework."; - public const string CmdNoRestoreDescription = "Add reference without performing restore preview and compatibility check."; + public const string CmdNoRestoreDescription = "Adds reference without performing restore preview and compatibility check."; - public const string CmdSourceDescription = "Use specific NuGet package sources to use during the restore."; + public const string CmdSourceDescription = "Uses specific NuGet package sources to use during the restore."; - public const string CmdPackageDirectoryDescription = "Restore the packages to this Directory ."; + public const string CmdPackageDirectoryDescription = "Restores the packages to the specified directory."; public const string CmdVersionDescription = "Version for the package to be added."; - public const string CmdDGFileException = "Unable to Create Dependency graph file for project '{0}'. Cannot add package reference."; + public const string CmdDGFileException = "Unable to create dependency graph file for project '{0}'. Cannot add package reference."; public const string CmdPackage = "PACKAGE_NAME"; @@ -35,4 +35,4 @@ namespace Microsoft.DotNet.Tools.Add.PackageReference public const string CmdPackageDirectory = "PACKAGE_DIRECTORY"; } -} \ No newline at end of file +} From 4aacb229937390085cd4e7fd5f1244fd3edeabd1 Mon Sep 17 00:00:00 2001 From: blackdwarf Date: Fri, 17 Feb 2017 09:00:25 -0800 Subject: [PATCH 02/30] Add support for dotnet help This commit adds supports for getting more detailed help by using the `dotnet help ` syntax (e.g. `dotnet help build`). This change opens up the URL that is specified for each verb in the default browser on the user's machine, so internet access is required. --- src/dotnet/BuiltInCommandMetadata.cs | 10 ++ src/dotnet/BuiltInCommandsCatalog.cs | 122 ++++++++++++++++++ src/dotnet/DotNetCommandFactory.cs | 4 +- src/dotnet/Program.cs | 54 +------- .../commands/dotnet-help/HelpCommand.cs | 66 +++++++++- .../dotnet-help/LocalizableStrings.cs | 13 ++ .../LinuxOnlyFactAttribute.cs | 19 +++ .../MacOsOnlyFactAttribute.cs | 19 +++ ...ivenThatIWantToShowHelpForDotnetCommand.cs | 35 +++++ 9 files changed, 292 insertions(+), 50 deletions(-) create mode 100644 src/dotnet/BuiltInCommandMetadata.cs create mode 100644 src/dotnet/BuiltInCommandsCatalog.cs create mode 100644 test/Microsoft.DotNet.Tools.Tests.Utilities/LinuxOnlyFactAttribute.cs create mode 100644 test/Microsoft.DotNet.Tools.Tests.Utilities/MacOsOnlyFactAttribute.cs diff --git a/src/dotnet/BuiltInCommandMetadata.cs b/src/dotnet/BuiltInCommandMetadata.cs new file mode 100644 index 000000000..7f7bf009b --- /dev/null +++ b/src/dotnet/BuiltInCommandMetadata.cs @@ -0,0 +1,10 @@ +using System; + +namespace Microsoft.DotNet.Cli +{ + public class BuiltInCommandMetadata + { + public Func Command { get; set; } + public Uri DocLink { get; set; } + } +} \ No newline at end of file diff --git a/src/dotnet/BuiltInCommandsCatalog.cs b/src/dotnet/BuiltInCommandsCatalog.cs new file mode 100644 index 000000000..05bea1cef --- /dev/null +++ b/src/dotnet/BuiltInCommandsCatalog.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using Microsoft.DotNet.Tools.Add; +using Microsoft.DotNet.Tools.Build; +using Microsoft.DotNet.Tools.Clean; +using Microsoft.DotNet.Tools.Help; +using Microsoft.DotNet.Tools.List; +using Microsoft.DotNet.Tools.Migrate; +using Microsoft.DotNet.Tools.MSBuild; +using Microsoft.DotNet.Tools.New; +using Microsoft.DotNet.Tools.NuGet; +using Microsoft.DotNet.Tools.Pack; +using Microsoft.DotNet.Tools.Publish; +using Microsoft.DotNet.Tools.Remove; +using Microsoft.DotNet.Tools.Restore; +using Microsoft.DotNet.Tools.Run; +using Microsoft.DotNet.Tools.Sln; +using Microsoft.DotNet.Tools.Test; +using Microsoft.DotNet.Tools.VSTest; +using Microsoft.DotNet.Tools.Cache; + +namespace Microsoft.DotNet.Cli +{ + public static class BuiltInCommandsCatalog + { + public static Dictionary Commands = new Dictionary + { + ["add"] = new BuiltInCommandMetadata + { + Command = AddCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-add") + }, + ["build"] = new BuiltInCommandMetadata + { + Command = BuildCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-build") + }, + ["cache"] = new BuiltInCommandMetadata + { + Command = CacheCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-cache") + }, + ["clean"] = new BuiltInCommandMetadata + { + Command = CleanCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-clean") + }, + ["help"] = new BuiltInCommandMetadata + { + Command = HelpCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-help") + }, + ["list"] = new BuiltInCommandMetadata + { + Command = ListCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-list") + }, + ["migrate"] = new BuiltInCommandMetadata + { + Command = MigrateCommand.Run, + DocLink = new Uri("http://aka.ms/dotnet-migrate") + + }, + ["msbuild"] = new BuiltInCommandMetadata + { + Command = MSBuildCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-msbuild") + }, + ["new"] = new BuiltInCommandMetadata + { + Command = NewCommandShim.Run, + DocLink = new Uri("https://aka.ms/dotnet-new") + }, + ["nuget"] = new BuiltInCommandMetadata + { + Command = NuGetCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-nuget") + }, + ["pack"] = new BuiltInCommandMetadata + { + Command = PackCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-pack") + }, + ["publish"] = new BuiltInCommandMetadata + { + Command = PublishCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-publish") + }, + ["remove"] = new BuiltInCommandMetadata + { + Command = RemoveCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-remove") + }, + ["restore"] = new BuiltInCommandMetadata + { + Command = RestoreCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-restore") + }, + ["run"] = new BuiltInCommandMetadata + { + Command = RunCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-run") + }, + ["sln"] = new BuiltInCommandMetadata + { + Command = SlnCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-sln") + }, + ["test"] = new BuiltInCommandMetadata + { + Command = TestCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-test") + }, + ["vstest"] = new BuiltInCommandMetadata + { + Command = VSTestCommand.Run, + DocLink = new Uri("https://aka.ms/dotnet-vstest") + } + }; + + } +} \ No newline at end of file diff --git a/src/dotnet/DotNetCommandFactory.cs b/src/dotnet/DotNetCommandFactory.cs index 8ead957d6..d9c17b639 100644 --- a/src/dotnet/DotNetCommandFactory.cs +++ b/src/dotnet/DotNetCommandFactory.cs @@ -24,13 +24,13 @@ namespace Microsoft.DotNet.Cli NuGetFramework framework = null, string configuration = Constants.DefaultConfiguration) { - Func builtInCommand; + BuiltInCommandMetadata builtInCommand; if (!_alwaysRunOutOfProc && Program.TryGetBuiltInCommand(commandName, out builtInCommand)) { Debug.Assert(framework == null, "BuiltInCommand doesn't support the 'framework' argument."); Debug.Assert(configuration == Constants.DefaultConfiguration, "BuiltInCommand doesn't support the 'configuration' argument."); - return new BuiltInCommand(commandName, args, builtInCommand); + return new BuiltInCommand(commandName, args, builtInCommand.Command); } return Command.CreateDotNet(commandName, args, framework, configuration); diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs index 12aaf631f..17ebe91ae 100644 --- a/src/dotnet/Program.cs +++ b/src/dotnet/Program.cs @@ -2,60 +2,18 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; -using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.DotNet.Cli.Utils; -using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Configurer; using Microsoft.DotNet.PlatformAbstractions; -using Microsoft.DotNet.Tools.Add; -using Microsoft.DotNet.Tools.Build; -using Microsoft.DotNet.Tools.Clean; using Microsoft.DotNet.Tools.Help; -using Microsoft.DotNet.Tools.List; -using Microsoft.DotNet.Tools.Migrate; -using Microsoft.DotNet.Tools.MSBuild; -using Microsoft.DotNet.Tools.New; -using Microsoft.DotNet.Tools.NuGet; -using Microsoft.DotNet.Tools.Pack; -using Microsoft.DotNet.Tools.Publish; -using Microsoft.DotNet.Tools.Remove; -using Microsoft.DotNet.Tools.Restore; -using Microsoft.DotNet.Tools.RestoreProjectJson; -using Microsoft.DotNet.Tools.Run; -using Microsoft.DotNet.Tools.Sln; -using Microsoft.DotNet.Tools.Test; -using Microsoft.DotNet.Tools.VSTest; -using Microsoft.DotNet.Tools.Cache; using NuGet.Frameworks; namespace Microsoft.DotNet.Cli { public class Program { - private static Dictionary> s_builtIns = new Dictionary> - { - ["add"] = AddCommand.Run, - ["build"] = BuildCommand.Run, - ["cache"] = CacheCommand.Run, - ["clean"] = CleanCommand.Run, - ["help"] = HelpCommand.Run, - ["list"] = ListCommand.Run, - ["migrate"] = MigrateCommand.Run, - ["msbuild"] = MSBuildCommand.Run, - ["new"] = NewCommandShim.Run, - ["nuget"] = NuGetCommand.Run, - ["pack"] = PackCommand.Run, - ["publish"] = PublishCommand.Run, - ["remove"] = RemoveCommand.Run, - ["restore"] = RestoreCommand.Run, - ["run"] = RunCommand.Run, - ["sln"] = SlnCommand.Run, - ["test"] = TestCommand.Run, - ["vstest"] = VSTestCommand.Run, - }; - public static int Main(string[] args) { DebugHelper.HandleDebugSwitch(ref args); @@ -169,10 +127,12 @@ namespace Microsoft.DotNet.Cli telemetryClient.TrackEvent(command, null, null); int exitCode; - Func builtIn; - if (s_builtIns.TryGetValue(command, out builtIn)) + // Func builtIn; + // if (s_builtIns.TryGetValue(command, out builtIn)) + BuiltInCommandMetadata builtIn; + if (BuiltInCommandsCatalog.Commands.TryGetValue(command, out builtIn)) { - exitCode = builtIn(appArgs.ToArray()); + exitCode = builtIn.Command(appArgs.ToArray()); } else { @@ -215,9 +175,9 @@ namespace Microsoft.DotNet.Cli Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); } - internal static bool TryGetBuiltInCommand(string commandName, out Func builtInCommand) + internal static bool TryGetBuiltInCommand(string commandName, out BuiltInCommandMetadata builtInCommand) { - return s_builtIns.TryGetValue(commandName, out builtInCommand); + return BuiltInCommandsCatalog.Commands.TryGetValue(commandName, out builtInCommand); } private static void PrintVersion() diff --git a/src/dotnet/commands/dotnet-help/HelpCommand.cs b/src/dotnet/commands/dotnet-help/HelpCommand.cs index 1a14efe6b..cc0afe797 100644 --- a/src/dotnet/commands/dotnet-help/HelpCommand.cs +++ b/src/dotnet/commands/dotnet-help/HelpCommand.cs @@ -1,7 +1,11 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System; +using System.Diagnostics; using System.Reflection; +using System.Runtime.InteropServices; +using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.Utils; namespace Microsoft.DotNet.Tools.Help @@ -49,6 +53,32 @@ Project modification commands: public static int Run(string[] args) { + + CommandLineApplication app = new CommandLineApplication(throwOnUnexpectedArg: false); + app.Name = "dotnet help"; + app.FullName = LocalizableStrings.AppFullName; + app.Description = LocalizableStrings.AppDescription; + + CommandArgument commandNameArgument = app.Argument($"<{LocalizableStrings.CommandArgumentName}>", LocalizableStrings.CommandArgumentDescription); + + app.OnExecute(() => + { + Cli.BuiltInCommandMetadata builtIn; + if (Cli.BuiltInCommandsCatalog.Commands.TryGetValue(commandNameArgument.Value, out builtIn)) + { + // var p = Process.Start(GetProcessStartInfo(builtIn)); + var process = ConfigureProcess(builtIn.DocLink.ToString()); + process.Start(); + process.WaitForExit(); + } + else + { + Reporter.Error.WriteLine(String.Format(LocalizableStrings.CommandDoesNotExist, commandNameArgument.Value)); + return 1; + } + return 0; + }); + if (args.Length == 0) { PrintHelp(); @@ -56,7 +86,7 @@ Project modification commands: } else { - return Cli.Program.Main(new[] { args[0], "--help" }); + return app.Execute(args); } } @@ -73,5 +103,39 @@ Project modification commands: $" ({Product.Version})"; Reporter.Output.WriteLine(Product.LongName + versionString); } + + public static Process ConfigureProcess(string docUrl) + { + ProcessStartInfo psInfo; + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + psInfo = new ProcessStartInfo + { + FileName = "cmd", + Arguments = $"/c start {docUrl}" + }; + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + psInfo = new ProcessStartInfo + { + FileName = "open", + Arguments = docUrl + }; + } + else + { + psInfo = new ProcessStartInfo + { + FileName = "xdg-open", + Arguments = docUrl + }; + } + + return new Process + { + StartInfo = psInfo + }; + } } } diff --git a/src/dotnet/commands/dotnet-help/LocalizableStrings.cs b/src/dotnet/commands/dotnet-help/LocalizableStrings.cs index 04a938ac8..07371de63 100644 --- a/src/dotnet/commands/dotnet-help/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-help/LocalizableStrings.cs @@ -66,5 +66,18 @@ namespace Microsoft.DotNet.Tools.Help public const string CleanDefinition = "Clean build output(s)."; public const string SlnDefinition = "Modify solution (SLN) files."; + + public const string CommandDoesNotExist = "Specified command {0} is not a valid CLI command. Please specify a valid CLI commands. For more information, run dotnet help."; + + public const string AppFullName = ".NET CLI help utility"; + + public const string AppDescription = "Utility to get more detailed help about each of the CLI commands."; + + public const string CommandArgumentName = "COMMAND_NAME"; + + public const string CommandArgumentDescription = "CLI command for which to view more detailed help."; + + + } } diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/LinuxOnlyFactAttribute.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/LinuxOnlyFactAttribute.cs new file mode 100644 index 000000000..cc8814c5b --- /dev/null +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/LinuxOnlyFactAttribute.cs @@ -0,0 +1,19 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using Microsoft.DotNet.PlatformAbstractions; +using Xunit; + +namespace Microsoft.DotNet.Tools.Test.Utilities +{ + public class LinuxOnlyFactAttribute : FactAttribute + { + public LinuxOnlyFactAttribute() + { + if (RuntimeEnvironment.OperatingSystemPlatform != Platform.Linux) + { + this.Skip = "This test requires linux to run"; + } + } + } +} diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/MacOsOnlyFactAttribute.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/MacOsOnlyFactAttribute.cs new file mode 100644 index 000000000..0b4442621 --- /dev/null +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/MacOsOnlyFactAttribute.cs @@ -0,0 +1,19 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using Microsoft.DotNet.PlatformAbstractions; +using Xunit; + +namespace Microsoft.DotNet.Tools.Test.Utilities +{ + public class MacOsOnlyFactAttribute : FactAttribute + { + public MacOsOnlyFactAttribute() + { + if (RuntimeEnvironment.OperatingSystemPlatform != Platform.Darwin) + { + this.Skip = "This test requires macos to run"; + } + } + } +} diff --git a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs index e98fb85e5..ee049a5e7 100644 --- a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs +++ b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs @@ -8,6 +8,7 @@ using Microsoft.Build.Construction; using Microsoft.DotNet.Tools.Test.Utilities; using Xunit; using FluentAssertions; +using HelpActual = Microsoft.DotNet.Tools.Help; namespace Microsoft.DotNet.Help.Tests { @@ -65,5 +66,39 @@ Advanced Commands: cmd.Should().Pass(); cmd.StdOut.Should().ContainVisuallySameFragment(HelpText); } + + [Fact] + public void WhenInvalidCommandIsPassedToDOtnetHelpItPrintsError() + { + var cmd = new DotnetCommand() + .ExecuteWithCapturedOutput("help invalid"); + + cmd.Should().Fail(); + cmd.StdErr.Should().ContainVisuallySameFragment($"Specified command invalid is not a valid CLI command. Please specify a valid CLI commands. For more information, run dotnet help."); + } + + [WindowsOnlyFact] + public void WhenRunOnWindowsDotnetHelpCommandShouldContainProperProcessInformation() + { + var proc = HelpActual.HelpCommand.ConfigureProcess("https://aka.ms/dotnet-build"); + Assert.Equal("cmd", proc.StartInfo.FileName); + Assert.Equal("/c start https://aka.ms/dotnet-build", proc.StartInfo.Arguments); + } + + [LinuxOnlyFact] + public void WhenRunOnLinuxDotnetHelpCommandShouldContainProperProcessInformation() + { + var proc = HelpActual.HelpCommand.ConfigureProcess("https://aka.ms/dotnet-build"); + Assert.Equal("xdg-open", proc.StartInfo.FileName); + Assert.Equal("https://aka.ms/dotnet-build", proc.StartInfo.Arguments); + + } + [MacOsOnlyFact] + public void WhenRunOnMacOsDotnetHelpCommandShouldContainProperProcessInformation() + { + var proc = HelpActual.HelpCommand.ConfigureProcess("https://aka.ms/dotnet-build"); + Assert.Equal("open", proc.StartInfo.FileName); + Assert.Equal("https://aka.ms/dotnet-build", proc.StartInfo.Arguments); + } } } From 4da96e1ace7379560489556f636f79c57d353dee Mon Sep 17 00:00:00 2001 From: Zlatko Knezevic Date: Sun, 5 Mar 2017 21:06:43 -0800 Subject: [PATCH 03/30] Responding to PR feedback --- src/dotnet/Program.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs index 17ebe91ae..0840049d8 100644 --- a/src/dotnet/Program.cs +++ b/src/dotnet/Program.cs @@ -127,8 +127,6 @@ namespace Microsoft.DotNet.Cli telemetryClient.TrackEvent(command, null, null); int exitCode; - // Func builtIn; - // if (s_builtIns.TryGetValue(command, out builtIn)) BuiltInCommandMetadata builtIn; if (BuiltInCommandsCatalog.Commands.TryGetValue(command, out builtIn)) { From 4a57564f081844ecf694ed34fa1447b41b3fda52 Mon Sep 17 00:00:00 2001 From: dotnet-bot Date: Fri, 10 Mar 2017 20:44:00 +0000 Subject: [PATCH 04/30] Update CoreSetup to beta-001737 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 4912b7e55..162b7f1d2 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,7 +1,7 @@ - 2.0.0-beta-001728-00 + 2.0.0-beta-001737-00 15.2.0-preview-000047-02 2.0.0-rc4-61325-08 1.1.0-alpha-20170306-2 From ed145b37a6b19cac5cbd9eb5e74499471d957dcd Mon Sep 17 00:00:00 2001 From: Karthik Rajasekaran Date: Fri, 10 Mar 2017 13:32:56 -0800 Subject: [PATCH 05/30] Allow bootstrap directory to be configured --- run-build.ps1 | 4 ++++ run-build.sh | 3 +++ 2 files changed, 7 insertions(+) diff --git a/run-build.ps1 b/run-build.ps1 index 67ab3cd06..3f2383325 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -71,6 +71,10 @@ $env:VSTEST_TRACE_BUILD=1 # set the base tools directory $toolsLocalPath = Join-Path $PSScriptRoot "build_tools" +if($env:BOOTSTRAP_INSTALL_DIR) +{ + $toolsLocalPath = $env:BOOTSTRAP_INSTALL_DIR +} $bootStrapperPath = Join-Path $toolsLocalPath "bootstrap.ps1" # if the boot-strapper script doesn't exist then download it if ((Test-Path $bootStrapperPath) -eq 0) diff --git a/run-build.sh b/run-build.sh index f96f9d0c0..25a1fa0d4 100755 --- a/run-build.sh +++ b/run-build.sh @@ -147,6 +147,9 @@ export VSTEST_TRACE_BUILD=1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 toolsLocalPath="$REPOROOT/build_tools" +if [ ! -z $BOOTSTRAP_INSTALL_DIR]; then + toolsLocalPath = $BOOTSTRAP_INSTALL_DIR +fi bootStrapperPath="$toolsLocalPath/bootstrap.sh" dotnetInstallPath="$toolsLocalPath/dotnet-install.sh" if [ ! -f $bootStrapperPath ]; then From 804f39e03444e1ced0cd8c548edce04cb484b458 Mon Sep 17 00:00:00 2001 From: foresterre Date: Sun, 12 Mar 2017 19:46:28 +0100 Subject: [PATCH 06/30] Fix broken links from #5928 in the documentation. --- CONTRIBUTING.md | 2 +- Documentation/README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 47cd25353..9271b689e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,4 +6,4 @@ See [Contributing](https://github.com/dotnet/corefx/blob/master/Documentation/pr Developers ========== -See the [Developer Guide](Documentation/developer-guide.md) for details about developing in this repo. \ No newline at end of file +See the [Developer Guide](Documentation/project-docs/developer-guide.md) for details about developing in this repo. \ No newline at end of file diff --git a/Documentation/README.md b/Documentation/README.md index 3a88a00f6..94edbb417 100644 --- a/Documentation/README.md +++ b/Documentation/README.md @@ -3,8 +3,8 @@ Documents Index ## Overview and general information -- [Intro to .NET Core CLI](intro-to-cli.md) -- [CLI UX Guidelines](cli-ux-guidelines.md) +- [Intro to .NET Core CLI](general/intro-to-cli.md) +- [CLI UX Guidelines](general/cli-ux-guidelines.md) - [.NET Core native pre-requisities document](https://github.com/dotnet/core/blob/master/Documentation/prereqs.md) - [Roadmap and OS support](https://github.com/dotnet/core/blob/master/roadmap.md) - [Comprehensive CLI documentation](https://docs.microsoft.com/en-us/dotnet/articles/core/preview3/tools/) @@ -12,7 +12,7 @@ Documents Index ## Working with the CLI repo - [Developer Guide](project-docs/developer-guide.md) -- [How to file issues](project-docs/issue-filing.guide.md) +- [How to file issues](project-docs/issue-filing-guide.md) ## Troubleshooting and issues reporting From ddd27248b164eabb6a1a69eef4684e63607bc854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Sailer?= Date: Mon, 13 Mar 2017 14:24:31 +0100 Subject: [PATCH 07/30] LOC CHECKIN | dotnet/cli | 20170313 | bugfix --- .../dotnet-add/dotnet-add-package/xlf/LocalizableStrings.ko.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.ko.xlf index e0988549e..8bdd3fce2 100644 --- a/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.ko.xlf @@ -35,7 +35,7 @@ Use specific NuGet package sources to use during the restore. - 복원 중 사용할 특정 NuGet 패키지 소스를 사용합니다. + 복원 중 사용할 특정 NuGet 패키지 원본을 사용합니다. From 5ac4287d5c0a9cb93eebd48a368f587be967c5f4 Mon Sep 17 00:00:00 2001 From: dotnet-bot Date: Mon, 13 Mar 2017 18:04:55 +0000 Subject: [PATCH 08/30] Update CoreSetup to beta-001745 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 162b7f1d2..995fc7103 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,7 +1,7 @@ - 2.0.0-beta-001737-00 + 2.0.0-beta-001745-00 15.2.0-preview-000047-02 2.0.0-rc4-61325-08 1.1.0-alpha-20170306-2 From fa986749544353faf97289f96e8e914c6cdcb92e Mon Sep 17 00:00:00 2001 From: Zlatko Knezevic Date: Mon, 13 Mar 2017 19:42:30 -0700 Subject: [PATCH 09/30] Responding to PR feedback --- src/dotnet/BuiltInCommandsCatalog.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/dotnet/BuiltInCommandsCatalog.cs b/src/dotnet/BuiltInCommandsCatalog.cs index 05bea1cef..69b19ccec 100644 --- a/src/dotnet/BuiltInCommandsCatalog.cs +++ b/src/dotnet/BuiltInCommandsCatalog.cs @@ -28,92 +28,110 @@ namespace Microsoft.DotNet.Cli ["add"] = new BuiltInCommandMetadata { Command = AddCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-add-reference DocLink = new Uri("https://aka.ms/dotnet-add") }, ["build"] = new BuiltInCommandMetadata { Command = BuildCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-build DocLink = new Uri("https://aka.ms/dotnet-build") }, ["cache"] = new BuiltInCommandMetadata { Command = CacheCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-cache DocLink = new Uri("https://aka.ms/dotnet-cache") }, ["clean"] = new BuiltInCommandMetadata { Command = CleanCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-clean DocLink = new Uri("https://aka.ms/dotnet-clean") }, ["help"] = new BuiltInCommandMetadata { Command = HelpCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-help DocLink = new Uri("https://aka.ms/dotnet-help") }, ["list"] = new BuiltInCommandMetadata { Command = ListCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-list-reference DocLink = new Uri("https://aka.ms/dotnet-list") }, ["migrate"] = new BuiltInCommandMetadata { Command = MigrateCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-migrate DocLink = new Uri("http://aka.ms/dotnet-migrate") }, ["msbuild"] = new BuiltInCommandMetadata { Command = MSBuildCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-msbuild DocLink = new Uri("https://aka.ms/dotnet-msbuild") }, ["new"] = new BuiltInCommandMetadata { Command = NewCommandShim.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-new DocLink = new Uri("https://aka.ms/dotnet-new") }, ["nuget"] = new BuiltInCommandMetadata { Command = NuGetCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-nuget-locals DocLink = new Uri("https://aka.ms/dotnet-nuget") }, ["pack"] = new BuiltInCommandMetadata { Command = PackCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-pack DocLink = new Uri("https://aka.ms/dotnet-pack") }, ["publish"] = new BuiltInCommandMetadata { Command = PublishCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-publish DocLink = new Uri("https://aka.ms/dotnet-publish") }, ["remove"] = new BuiltInCommandMetadata { Command = RemoveCommand.Run, + // aka.ms link: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-remove-reference DocLink = new Uri("https://aka.ms/dotnet-remove") }, ["restore"] = new BuiltInCommandMetadata { Command = RestoreCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-restore DocLink = new Uri("https://aka.ms/dotnet-restore") }, ["run"] = new BuiltInCommandMetadata { Command = RunCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-run DocLink = new Uri("https://aka.ms/dotnet-run") }, ["sln"] = new BuiltInCommandMetadata { Command = SlnCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-sln DocLink = new Uri("https://aka.ms/dotnet-sln") }, ["test"] = new BuiltInCommandMetadata { Command = TestCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-test DocLink = new Uri("https://aka.ms/dotnet-test") }, ["vstest"] = new BuiltInCommandMetadata { Command = VSTestCommand.Run, + // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-vstest DocLink = new Uri("https://aka.ms/dotnet-vstest") } }; From 36e3d5d2f957f9bc0d2c156d6e18ed43d6209b4f Mon Sep 17 00:00:00 2001 From: Zlatko Knezevic Date: Mon, 13 Mar 2017 20:56:42 -0700 Subject: [PATCH 10/30] Removing locale from the commented links --- src/dotnet/BuiltInCommandsCatalog.cs | 36 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/dotnet/BuiltInCommandsCatalog.cs b/src/dotnet/BuiltInCommandsCatalog.cs index 69b19ccec..d7dce8e37 100644 --- a/src/dotnet/BuiltInCommandsCatalog.cs +++ b/src/dotnet/BuiltInCommandsCatalog.cs @@ -28,110 +28,110 @@ namespace Microsoft.DotNet.Cli ["add"] = new BuiltInCommandMetadata { Command = AddCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-add-reference + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-add-reference DocLink = new Uri("https://aka.ms/dotnet-add") }, ["build"] = new BuiltInCommandMetadata { Command = BuildCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-build + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-build DocLink = new Uri("https://aka.ms/dotnet-build") }, ["cache"] = new BuiltInCommandMetadata { Command = CacheCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-cache + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-cache DocLink = new Uri("https://aka.ms/dotnet-cache") }, ["clean"] = new BuiltInCommandMetadata { Command = CleanCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-clean + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-clean DocLink = new Uri("https://aka.ms/dotnet-clean") }, ["help"] = new BuiltInCommandMetadata { Command = HelpCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-help + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-help DocLink = new Uri("https://aka.ms/dotnet-help") }, ["list"] = new BuiltInCommandMetadata { Command = ListCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-list-reference + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-list-reference DocLink = new Uri("https://aka.ms/dotnet-list") }, ["migrate"] = new BuiltInCommandMetadata { Command = MigrateCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-migrate + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-migrate DocLink = new Uri("http://aka.ms/dotnet-migrate") }, ["msbuild"] = new BuiltInCommandMetadata { Command = MSBuildCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-msbuild + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-msbuild DocLink = new Uri("https://aka.ms/dotnet-msbuild") }, ["new"] = new BuiltInCommandMetadata { Command = NewCommandShim.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-new + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-new DocLink = new Uri("https://aka.ms/dotnet-new") }, ["nuget"] = new BuiltInCommandMetadata { Command = NuGetCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-nuget-locals + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-nuget-locals DocLink = new Uri("https://aka.ms/dotnet-nuget") }, ["pack"] = new BuiltInCommandMetadata { Command = PackCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-pack + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-pack DocLink = new Uri("https://aka.ms/dotnet-pack") }, ["publish"] = new BuiltInCommandMetadata { Command = PublishCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-publish + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-publish DocLink = new Uri("https://aka.ms/dotnet-publish") }, ["remove"] = new BuiltInCommandMetadata { Command = RemoveCommand.Run, - // aka.ms link: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-remove-reference + // aka.ms link: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-remove-reference DocLink = new Uri("https://aka.ms/dotnet-remove") }, ["restore"] = new BuiltInCommandMetadata { Command = RestoreCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-restore + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-restore DocLink = new Uri("https://aka.ms/dotnet-restore") }, ["run"] = new BuiltInCommandMetadata { Command = RunCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-run + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-run DocLink = new Uri("https://aka.ms/dotnet-run") }, ["sln"] = new BuiltInCommandMetadata { Command = SlnCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-sln + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-sln DocLink = new Uri("https://aka.ms/dotnet-sln") }, ["test"] = new BuiltInCommandMetadata { Command = TestCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-test + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-test DocLink = new Uri("https://aka.ms/dotnet-test") }, ["vstest"] = new BuiltInCommandMetadata { Command = VSTestCommand.Run, - // aka.ms target: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-vstest + // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-vstest DocLink = new Uri("https://aka.ms/dotnet-vstest") } }; From 3fd60e911fba34e603776387df1b95ba47dc9540 Mon Sep 17 00:00:00 2001 From: dotnet-bot Date: Tue, 14 Mar 2017 04:59:57 +0000 Subject: [PATCH 11/30] Update CoreSetup to beta-001747 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 995fc7103..1e680918b 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,7 +1,7 @@ - 2.0.0-beta-001745-00 + 2.0.0-beta-001747-00 15.2.0-preview-000047-02 2.0.0-rc4-61325-08 1.1.0-alpha-20170306-2 From cacd52fdbb8a040c18d40f7a18e18836e27589f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikolaj=20J=C3=B8rgensen?= Date: Tue, 14 Mar 2017 10:55:29 +0100 Subject: [PATCH 12/30] Change name for DOTNET_PACKAGES to NUGET_PACKAGES README was never updated in #817, making it show an obsolete variable. This reflects the name used in the current code --- src/dotnet/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet/README.md b/src/dotnet/README.md index 5729f3039..52204fbe6 100644 --- a/src/dotnet/README.md +++ b/src/dotnet/README.md @@ -74,7 +74,7 @@ Runs a portable app named `myapp.dll`. ## ENVIRONMENT -`DOTNET_PACKAGES` +`NUGET_PACKAGES` The primary package cache. If not set, it defaults to $HOME/.nuget/packages on Unix or %HOME%\NuGet\Packages on Windows. From 46a1d6f41ed12eba8703057b4b8f0c5e28628c99 Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Tue, 14 Mar 2017 11:46:17 -0400 Subject: [PATCH 13/30] Add --runtime-id flag to dotnet-install.sh This lets us specify the runtime id of the desired .NET Core SDK on the command line. This makes it easier to get the SDK for the desired runtime without having to modify the install script for new runtimes unsupported by the current version of this script. --- scripts/obtain/dotnet-install.sh | 115 ++++++++++++++++++------------- 1 file changed, 68 insertions(+), 47 deletions(-) diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index af2b369a6..780806f3e 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -56,6 +56,59 @@ say_verbose() { fi } +get_os_download_name_from_platform() { + eval $invocation + + platform="$1" + case "$platform" in + "centos.7") + echo "centos" + return 0 + ;; + "debian.8") + echo "debian" + return 0 + ;; + "fedora.23") + echo "fedora.23" + return 0 + ;; + "fedora.24") + echo "fedora.24" + return 0 + ;; + "opensuse.13.2") + echo "opensuse.13.2" + return 0 + ;; + "opensuse.42.1") + echo "opensuse.42.1" + return 0 + ;; + "rhel.7"*) + echo "rhel" + return 0 + ;; + "ubuntu.14.04") + echo "ubuntu" + return 0 + ;; + "ubuntu.16.04") + echo "ubuntu.16.04" + return 0 + ;; + "ubuntu.16.10") + echo "ubuntu.16.10" + return 0 + ;; + "alpine.3.4.3") + echo "alpine" + return 0 + ;; + esac + return 1 +} + get_current_os_name() { eval $invocation @@ -66,56 +119,17 @@ get_current_os_name() { elif [ "$uname" = "Darwin" ]; then echo "osx" return 0 + elif [ -n "$runtime_id" ]; then + echo $(get_os_download_name_from_platform "${runtime_id%-*}" || echo "${runtime_id%-*}") + return 0 else if [ -e /etc/os-release ]; then . /etc/os-release - - case "$ID.$VERSION_ID" in - "centos.7") - echo "centos" - return 0 - ;; - "debian.8") - echo "debian" - return 0 - ;; - "fedora.23") - echo "fedora.23" - return 0 - ;; - "fedora.24") - echo "fedora.24" - return 0 - ;; - "opensuse.13.2") - echo "opensuse.13.2" - return 0 - ;; - "opensuse.42.1") - echo "opensuse.42.1" - return 0 - ;; - "rhel.7"*) - echo "rhel" - return 0 - ;; - "ubuntu.14.04") - echo "ubuntu" - return 0 - ;; - "ubuntu.16.04") - echo "ubuntu.16.04" - return 0 - ;; - "ubuntu.16.10") - echo "ubuntu.16.10" - return 0 - ;; - "alpine.3.4.3") - echo "alpine" - return 0 - ;; - esac + os=$(get_os_download_name_from_platform "$ID.$VERSION_ID" || echo "") + if [ -n "$os" ]; then + echo "$os" + return 0 + fi fi fi @@ -588,6 +602,7 @@ uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet" verbose=false shared_runtime=false linux_portable=false +runtime_id="" while [ $# -ne 0 ] do @@ -631,6 +646,10 @@ do --linux-portable|-[Ll]inux[Pp]ortable) linux_portable=true ;; + --runtime-id|-[Rr]untime[Ii]d) + shift + runtime_id="$1" + ;; -?|--?|-h|--help|-[Hh]elp) script_name="$(basename $0)" echo ".NET Tools Installer" @@ -657,6 +676,8 @@ do echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed" echo " --linux-portable Installs the Linux portable .NET Tools instead of a distro-specific version." echo " -LinuxPortable" + echo " --runtime-id Installs the .NET Tools for the given platform (such as linux-x64)." + echo " -RuntimeId" echo " -?,--?,-h,--help,-Help Shows this help message" echo "" echo "Install Location:" From 8236618e42dcdc1920ad378f98ba56a6f57b79c4 Mon Sep 17 00:00:00 2001 From: dotnet-bot Date: Wed, 15 Mar 2017 00:28:21 +0000 Subject: [PATCH 14/30] Update CoreSetup to beta-001763 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 1e680918b..e8b9a643d 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,7 +1,7 @@ - 2.0.0-beta-001747-00 + 2.0.0-beta-001763-00 15.2.0-preview-000047-02 2.0.0-rc4-61325-08 1.1.0-alpha-20170306-2 From f062da06522712820164a442ff440832d7a584f4 Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Wed, 15 Mar 2017 02:48:05 -0700 Subject: [PATCH 15/30] updated test to use new string --- test/dotnet-add-package.Tests/GivenDotnetPackageAdd.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dotnet-add-package.Tests/GivenDotnetPackageAdd.cs b/test/dotnet-add-package.Tests/GivenDotnetPackageAdd.cs index 3cf2cd76c..eb8d24658 100644 --- a/test/dotnet-add-package.Tests/GivenDotnetPackageAdd.cs +++ b/test/dotnet-add-package.Tests/GivenDotnetPackageAdd.cs @@ -130,7 +130,7 @@ namespace Microsoft.DotNet.Cli.Package.Add.Tests .WithWorkingDirectory(projectDirectory) .ExecuteWithCapturedOutput($"add package package1 package2 package3"); cmd.Should().Fail(); - cmd.StdErr.Should().Contain("Please specify one package reference to add."); + cmd.StdErr.Should().Contain("Please specify only one package reference to be added."); } [Fact] From d251734170964a2ae8ea39d12fb737f0df6c681b Mon Sep 17 00:00:00 2001 From: Zlatko Knezevic Date: Wed, 15 Mar 2017 07:24:00 -0700 Subject: [PATCH 16/30] Responding to PR feedback --- src/dotnet/BuiltInCommandMetadata.cs | 2 +- src/dotnet/BuiltInCommandsCatalog.cs | 36 +++++++++---------- .../commands/dotnet-help/HelpCommand.cs | 9 ++--- ...ivenThatIWantToShowHelpForDotnetCommand.cs | 2 +- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/src/dotnet/BuiltInCommandMetadata.cs b/src/dotnet/BuiltInCommandMetadata.cs index 7f7bf009b..bb2d48181 100644 --- a/src/dotnet/BuiltInCommandMetadata.cs +++ b/src/dotnet/BuiltInCommandMetadata.cs @@ -5,6 +5,6 @@ namespace Microsoft.DotNet.Cli public class BuiltInCommandMetadata { public Func Command { get; set; } - public Uri DocLink { get; set; } + public string DocLink { get; set; } } } \ No newline at end of file diff --git a/src/dotnet/BuiltInCommandsCatalog.cs b/src/dotnet/BuiltInCommandsCatalog.cs index d7dce8e37..16b0b5331 100644 --- a/src/dotnet/BuiltInCommandsCatalog.cs +++ b/src/dotnet/BuiltInCommandsCatalog.cs @@ -29,110 +29,110 @@ namespace Microsoft.DotNet.Cli { Command = AddCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-add-reference - DocLink = new Uri("https://aka.ms/dotnet-add") + DocLink = "https://aka.ms/dotnet-add" }, ["build"] = new BuiltInCommandMetadata { Command = BuildCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-build - DocLink = new Uri("https://aka.ms/dotnet-build") + DocLink = "https://aka.ms/dotnet-build" }, ["cache"] = new BuiltInCommandMetadata { Command = CacheCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-cache - DocLink = new Uri("https://aka.ms/dotnet-cache") + DocLink = "https://aka.ms/dotnet-cache" }, ["clean"] = new BuiltInCommandMetadata { Command = CleanCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-clean - DocLink = new Uri("https://aka.ms/dotnet-clean") + DocLink = "https://aka.ms/dotnet-clean" }, ["help"] = new BuiltInCommandMetadata { Command = HelpCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-help - DocLink = new Uri("https://aka.ms/dotnet-help") + DocLink = "https://aka.ms/dotnet-help" }, ["list"] = new BuiltInCommandMetadata { Command = ListCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-list-reference - DocLink = new Uri("https://aka.ms/dotnet-list") + DocLink = "https://aka.ms/dotnet-list" }, ["migrate"] = new BuiltInCommandMetadata { Command = MigrateCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-migrate - DocLink = new Uri("http://aka.ms/dotnet-migrate") + DocLink = "http://aka.ms/dotnet-migrate" }, ["msbuild"] = new BuiltInCommandMetadata { Command = MSBuildCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-msbuild - DocLink = new Uri("https://aka.ms/dotnet-msbuild") + DocLink = "https://aka.ms/dotnet-msbuild" }, ["new"] = new BuiltInCommandMetadata { Command = NewCommandShim.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-new - DocLink = new Uri("https://aka.ms/dotnet-new") + DocLink = "https://aka.ms/dotnet-new" }, ["nuget"] = new BuiltInCommandMetadata { Command = NuGetCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-nuget-locals - DocLink = new Uri("https://aka.ms/dotnet-nuget") + DocLink = "https://aka.ms/dotnet-nuget" }, ["pack"] = new BuiltInCommandMetadata { Command = PackCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-pack - DocLink = new Uri("https://aka.ms/dotnet-pack") + DocLink = "https://aka.ms/dotnet-pack" }, ["publish"] = new BuiltInCommandMetadata { Command = PublishCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-publish - DocLink = new Uri("https://aka.ms/dotnet-publish") + DocLink = "https://aka.ms/dotnet-publish" }, ["remove"] = new BuiltInCommandMetadata { Command = RemoveCommand.Run, // aka.ms link: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-remove-reference - DocLink = new Uri("https://aka.ms/dotnet-remove") + DocLink = "https://aka.ms/dotnet-remove" }, ["restore"] = new BuiltInCommandMetadata { Command = RestoreCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-restore - DocLink = new Uri("https://aka.ms/dotnet-restore") + DocLink = "https://aka.ms/dotnet-restore" }, ["run"] = new BuiltInCommandMetadata { Command = RunCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-run - DocLink = new Uri("https://aka.ms/dotnet-run") + DocLink = "https://aka.ms/dotnet-run" }, ["sln"] = new BuiltInCommandMetadata { Command = SlnCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-sln - DocLink = new Uri("https://aka.ms/dotnet-sln") + DocLink = "https://aka.ms/dotnet-sln" }, ["test"] = new BuiltInCommandMetadata { Command = TestCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-test - DocLink = new Uri("https://aka.ms/dotnet-test") + DocLink = "https://aka.ms/dotnet-test" }, ["vstest"] = new BuiltInCommandMetadata { Command = VSTestCommand.Run, // aka.ms target: https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-vstest - DocLink = new Uri("https://aka.ms/dotnet-vstest") + DocLink = "https://aka.ms/dotnet-vstest" } }; diff --git a/src/dotnet/commands/dotnet-help/HelpCommand.cs b/src/dotnet/commands/dotnet-help/HelpCommand.cs index cc0afe797..7c12ac37d 100644 --- a/src/dotnet/commands/dotnet-help/HelpCommand.cs +++ b/src/dotnet/commands/dotnet-help/HelpCommand.cs @@ -7,6 +7,7 @@ using System.Reflection; using System.Runtime.InteropServices; using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.Utils; +using Microsoft.DotNet.Cli; namespace Microsoft.DotNet.Tools.Help { @@ -63,17 +64,17 @@ Project modification commands: app.OnExecute(() => { - Cli.BuiltInCommandMetadata builtIn; - if (Cli.BuiltInCommandsCatalog.Commands.TryGetValue(commandNameArgument.Value, out builtIn)) + BuiltInCommandMetadata builtIn; + if (BuiltInCommandsCatalog.Commands.TryGetValue(commandNameArgument.Value, out builtIn)) { - // var p = Process.Start(GetProcessStartInfo(builtIn)); - var process = ConfigureProcess(builtIn.DocLink.ToString()); + var process = ConfigureProcess(builtIn.DocLink); process.Start(); process.WaitForExit(); } else { Reporter.Error.WriteLine(String.Format(LocalizableStrings.CommandDoesNotExist, commandNameArgument.Value)); + Reporter.Output.WriteLine(UsageText); return 1; } return 0; diff --git a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs index ee049a5e7..162239d79 100644 --- a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs +++ b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs @@ -68,7 +68,7 @@ Advanced Commands: } [Fact] - public void WhenInvalidCommandIsPassedToDOtnetHelpItPrintsError() + public void WhenInvalidCommandIsPassedToDotnetHelpItPrintsError() { var cmd = new DotnetCommand() .ExecuteWithCapturedOutput("help invalid"); From 30a872bd80e7a062cf872f05417236632b979731 Mon Sep 17 00:00:00 2001 From: blackdwarf Date: Wed, 15 Mar 2017 09:51:07 -0700 Subject: [PATCH 17/30] Responding to PR feedback --- src/dotnet/commands/dotnet-help/LocalizableStrings.cs | 2 +- .../GivenThatIWantToShowHelpForDotnetCommand.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dotnet/commands/dotnet-help/LocalizableStrings.cs b/src/dotnet/commands/dotnet-help/LocalizableStrings.cs index 07371de63..b6c8cbb5d 100644 --- a/src/dotnet/commands/dotnet-help/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-help/LocalizableStrings.cs @@ -67,7 +67,7 @@ namespace Microsoft.DotNet.Tools.Help public const string SlnDefinition = "Modify solution (SLN) files."; - public const string CommandDoesNotExist = "Specified command {0} is not a valid CLI command. Please specify a valid CLI commands. For more information, run dotnet help."; + public const string CommandDoesNotExist = "Specified command '{0}' is not a valid CLI command. Please specify a valid CLI commands. For more information, run dotnet help."; public const string AppFullName = ".NET CLI help utility"; diff --git a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs index 162239d79..710d36643 100644 --- a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs +++ b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs @@ -75,6 +75,7 @@ Advanced Commands: cmd.Should().Fail(); cmd.StdErr.Should().ContainVisuallySameFragment($"Specified command invalid is not a valid CLI command. Please specify a valid CLI commands. For more information, run dotnet help."); + cmd.StdOut.Should().ContainVisuallySameFragment(HelpText); } [WindowsOnlyFact] From 6179028c53849dc56a2b2bd824486a6b0b37f12e Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Wed, 15 Mar 2017 13:20:18 -0700 Subject: [PATCH 18/30] Bypass powershell execution policy --- build.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.cmd b/build.cmd index 013687943..ce681438b 100644 --- a/build.cmd +++ b/build.cmd @@ -3,5 +3,5 @@ REM Copyright (c) .NET Foundation and contributors. All rights reserved. REM Licensed under the MIT license. See LICENSE file in the project root for full license information. -powershell -NoProfile -NoLogo -Command "& \"%~dp0run-build.ps1\" %*; exit $LastExitCode;" +powershell -ExecutionPolicy Bypass -NoProfile -NoLogo -Command "& \"%~dp0run-build.ps1\" %*; exit $LastExitCode;" if %errorlevel% neq 0 exit /b %errorlevel% From f6ba5c4f342dd21ccbd8d0b800c00bcf7776113e Mon Sep 17 00:00:00 2001 From: blackdwarf Date: Wed, 15 Mar 2017 17:00:52 -0700 Subject: [PATCH 19/30] Fixing failing test --- .../GivenThatIWantToShowHelpForDotnetCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs index 710d36643..09cae73ab 100644 --- a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs +++ b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs @@ -74,7 +74,7 @@ Advanced Commands: .ExecuteWithCapturedOutput("help invalid"); cmd.Should().Fail(); - cmd.StdErr.Should().ContainVisuallySameFragment($"Specified command invalid is not a valid CLI command. Please specify a valid CLI commands. For more information, run dotnet help."); + cmd.StdErr.Should().ContainVisuallySameFragment($"Specified command 'invalid' is not a valid CLI command. Please specify a valid CLI commands. For more information, run dotnet help."); cmd.StdOut.Should().ContainVisuallySameFragment(HelpText); } From ff27937d731a23a53435ccc1b8887a31d298417b Mon Sep 17 00:00:00 2001 From: dotnet-bot Date: Thu, 16 Mar 2017 00:55:37 +0000 Subject: [PATCH 20/30] Update CoreSetup to beta-001776 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index e8b9a643d..1a5804403 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,7 +1,7 @@ - 2.0.0-beta-001763-00 + 2.0.0-beta-001776-00 15.2.0-preview-000047-02 2.0.0-rc4-61325-08 1.1.0-alpha-20170306-2 From d95f5990284349ec353746fe69ff9ba1165dba0b Mon Sep 17 00:00:00 2001 From: Satya Madala Date: Thu, 16 Mar 2017 21:58:49 +0530 Subject: [PATCH 21/30] Remove unavailable netcore10 assemblies --- src/redist/redist.csproj | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index 95aa96d4a..c62ab4b37 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -153,18 +153,6 @@ - - - - - - - From d42602e3774149136d6fb2866225764f88ad0db6 Mon Sep 17 00:00:00 2001 From: Satya Madala Date: Thu, 16 Mar 2017 23:19:12 +0530 Subject: [PATCH 22/30] add Testplatform netcore2.0 targetted and vstest myget feed --- NuGet.Config | 1 + build/DependencyVersions.props | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NuGet.Config b/NuGet.Config index 556ee5919..50974735c 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -10,5 +10,6 @@ + diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 995fc7103..8b8040fdd 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -7,7 +7,7 @@ 1.1.0-alpha-20170306-2 4.3.0-beta1-2342 1.0.0-alpha-20170130-3-281 - 15.0.0 + 15.1.0-preview-20170316-05 $(CLI_SharedFrameworkVersion) $(CLI_SharedFrameworkVersion) $(CLI_SharedFrameworkVersion) From 9b06921b7586ead894d98b1821f906c097fbd38f Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Thu, 16 Mar 2017 10:59:33 -0700 Subject: [PATCH 23/30] addressed feedback --- .../dotnet-add/dotnet-add-package/LocalizableStrings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.cs b/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.cs index be30b3d2f..b9657a867 100644 --- a/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.cs @@ -17,7 +17,7 @@ namespace Microsoft.DotNet.Tools.Add.PackageReference public const string CmdNoRestoreDescription = "Adds reference without performing restore preview and compatibility check."; - public const string CmdSourceDescription = "Uses specific NuGet package sources to use during the restore."; + public const string CmdSourceDescription = "Specifies NuGet package sources to use during the restore."; public const string CmdPackageDirectoryDescription = "Restores the packages to the specified directory."; From 21ae26afb7c4fabf2a4b4c51a108f29fdf98eab4 Mon Sep 17 00:00:00 2001 From: Satya Madala Date: Fri, 17 Mar 2017 00:14:45 +0530 Subject: [PATCH 24/30] Update vstest public feed --- NuGet.Config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuGet.Config b/NuGet.Config index 50974735c..f14a56c99 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -10,6 +10,6 @@ - + From 1f886632f2ffdec5272a0b873ad178d30bdcadcc Mon Sep 17 00:00:00 2001 From: Satya Madala Date: Fri, 17 Mar 2017 00:20:40 +0530 Subject: [PATCH 25/30] remove NetCore10Assemblies renaming back --- src/redist/redist.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index c62ab4b37..7c7ef6569 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -183,10 +183,6 @@ PlatformAssemblyPaths="@(PlatformAssemblies); @(PublishDirSubDirectories); $(SharedFrameworkNameVersionPath)" /> - - - Date: Wed, 15 Mar 2017 17:04:50 -0700 Subject: [PATCH 26/30] Allow nuget packages to be configured --- run-build.ps1 | 4 +++- run-build.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/run-build.ps1 b/run-build.ps1 index 3f2383325..ea77e8983 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -29,7 +29,9 @@ if($Help) $env:CONFIGURATION = $Configuration; $RepoRoot = "$PSScriptRoot" -$env:NUGET_PACKAGES = "$RepoRoot\.nuget\packages" +if(!$env:NUGET_PACKAGES){ + $env:NUGET_PACKAGES = "$RepoRoot\.nuget\packages" +} if($NoPackage) { diff --git a/run-build.sh b/run-build.sh index 25a1fa0d4..9c5c2beb4 100755 --- a/run-build.sh +++ b/run-build.sh @@ -59,7 +59,7 @@ LINUX_PORTABLE_INSTALL_ARGS= CUSTOM_BUILD_ARGS= # Set nuget package cache under the repo -export NUGET_PACKAGES="$REPOROOT/.nuget/packages" +[ -z $NUGET_PACKAGES ] && export NUGET_PACKAGES="$REPOROOT/.nuget/packages" args=( "$@" ) From 1ee952920368935ece7d66ae92975f1eb09f7e3a Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Thu, 16 Mar 2017 16:10:48 -0700 Subject: [PATCH 27/30] reverted SpecifyExactlyOnePackageReference string --- .../dotnet-add/dotnet-add-package/LocalizableStrings.cs | 2 +- test/dotnet-add-package.Tests/GivenDotnetPackageAdd.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.cs b/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.cs index b9657a867..a4514f2e0 100644 --- a/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.cs @@ -11,7 +11,7 @@ namespace Microsoft.DotNet.Tools.Add.PackageReference public const string CmdPackageDescription = "The package reference to add."; - public const string SpecifyExactlyOnePackageReference = "Please specify only one package reference to be added."; + public const string SpecifyExactlyOnePackageReference = "Please specify one package reference to add."; public const string CmdFrameworkDescription = "Adds reference only when targeting a specific framework."; diff --git a/test/dotnet-add-package.Tests/GivenDotnetPackageAdd.cs b/test/dotnet-add-package.Tests/GivenDotnetPackageAdd.cs index eb8d24658..3cf2cd76c 100644 --- a/test/dotnet-add-package.Tests/GivenDotnetPackageAdd.cs +++ b/test/dotnet-add-package.Tests/GivenDotnetPackageAdd.cs @@ -130,7 +130,7 @@ namespace Microsoft.DotNet.Cli.Package.Add.Tests .WithWorkingDirectory(projectDirectory) .ExecuteWithCapturedOutput($"add package package1 package2 package3"); cmd.Should().Fail(); - cmd.StdErr.Should().Contain("Please specify only one package reference to be added."); + cmd.StdErr.Should().Contain("Please specify one package reference to add."); } [Fact] From 7cdef98e18bafb0218c0fa0cf720ae14a4c45225 Mon Sep 17 00:00:00 2001 From: dotnet-bot Date: Fri, 17 Mar 2017 01:32:18 +0000 Subject: [PATCH 28/30] Update CoreSetup to beta-001783 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 1a787765f..bfe93fd54 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,7 +1,7 @@ - 2.0.0-beta-001776-00 + 2.0.0-beta-001783-00 15.2.0-preview-000047-02 2.0.0-rc4-61325-08 1.1.0-alpha-20170306-2 From 1a767d42387f32d0ea3b2cc131c132d1b504b7b9 Mon Sep 17 00:00:00 2001 From: dotnet-bot Date: Fri, 17 Mar 2017 20:56:42 +0000 Subject: [PATCH 29/30] Update CoreSetup to beta-001791 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index bfe93fd54..a5c1e8c0f 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,7 +1,7 @@ - 2.0.0-beta-001783-00 + 2.0.0-beta-001791-00 15.2.0-preview-000047-02 2.0.0-rc4-61325-08 1.1.0-alpha-20170306-2 From 4b233bdf82a3ac4f465bdc3caab2c90586adda2b Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Fri, 17 Mar 2017 22:04:24 -0400 Subject: [PATCH 30/30] Fix path printed in help for dotnet-install The script does not install to /usr/local/share/. It instead installs to $HOME/.dotnet. Fix the doc text. Also fix the names in code that incorrectly talk about /usr/local/share. --- scripts/obtain/dotnet-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index 780806f3e..739b9d147 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -414,7 +414,7 @@ construct_download_link() { return 0 } -get_user_share_path() { +get_user_install_path() { eval $invocation if [ ! -z "${DOTNET_INSTALL_DIR:-}" ]; then @@ -432,9 +432,9 @@ resolve_installation_path() { local install_dir=$1 if [ "$install_dir" = "" ]; then - local user_share_path=$(get_user_share_path) - say_verbose "resolve_installation_path: share_path=$user_share_path" - echo "$user_share_path" + local user_install_path=$(get_user_install_path) + say_verbose "resolve_installation_path: user_install_path=$user_install_path" + echo "$user_install_path" return 0 fi @@ -684,7 +684,7 @@ do echo " Location is chosen in following order:" echo " - --install-dir option" echo " - Environmental variable DOTNET_INSTALL_DIR" - echo " - /usr/local/share/dotnet" + echo " - $HOME/.dotnet" exit 0 ;; *)