Skip to content

Commit

Permalink
(#1861) Improves terminology in help documentation
Browse files Browse the repository at this point in the history
Some suggestions were made on how the help documentation for various
commands could be improved, making them less subjective.
  • Loading branch information
mprasanth authored and gep13 committed Apr 18, 2021
1 parent e6c42ba commit 5daade7
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace chocolatey.infrastructure.app.commands
using logging;
using services;

[CommandFor("install", "installs packages from various sources")]
[CommandFor("install", "installs packages using configured sources")]
public class ChocolateyInstallCommand : ICommand
{
private readonly IChocolateyPackageService _packageService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace chocolatey.infrastructure.app.commands
using services;
using templates;

[CommandFor("new", "generates files necessary for a chocolatey package from a template")]
[CommandFor("new", "creates template files for creating a new Chocolatey package")]
public class ChocolateyNewCommand : ICommand
{
private readonly ITemplateService _templateService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace chocolatey.infrastructure.app.commands
using logging;
using services;

[CommandFor("outdated", "retrieves packages that are outdated. Similar to upgrade all --noop")]
[CommandFor("outdated", "retrieves information about packages that are outdated. Similar to upgrade all --noop")]
public class ChocolateyOutdatedCommand : ICommand
{
private readonly IChocolateyPackageService _packageService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace chocolatey.infrastructure.app.commands
using logging;
using services;

[CommandFor("pack", "packages up a nuspec to a compiled nupkg")]
[CommandFor("pack", "packages nuspec, scripts, and other Chocolatey package resources into a nupkg file")]
public class ChocolateyPackCommand : ICommand
{
private readonly IChocolateyPackageService _packageService;
Expand Down
66 changes: 33 additions & 33 deletions src/chocolatey/infrastructure.app/commands/ChocolateyPushCommand.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Copyright © 2017 - 2018 Chocolatey Software, Inc
// Copyright © 2011 - 2017 RealDimensions Software, LLC
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
//
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -25,7 +25,7 @@ namespace chocolatey.infrastructure.app.commands
using logging;
using services;

[CommandFor("push", "pushes a compiled nupkg")]
[CommandFor("push", "pushes a compiled nupkg to a source")]
public class ChocolateyPushCommand : ICommand
{
private readonly IChocolateyPackageService _packageService;
Expand Down Expand Up @@ -87,12 +87,12 @@ public virtual void handle_additional_argument_parsing(IList<string> unparsedArg
}
else
{
this.Log().Warn(ChocolateyLoggers.Important, @"ACTION: Please update your apikey to use
'{0}'
instead of
'{1}'.
The latter source url is now considered deprecated and will not be
checked as the default source in Chocolatey v1.0. For details, run
this.Log().Warn(ChocolateyLoggers.Important, @"ACTION: Please update your apikey to use
'{0}'
instead of
'{1}'.
The latter source url is now considered deprecated and will not be
checked as the default source in Chocolatey v1.0. For details, run
`choco apikey -?`".format_with(ApplicationParameters.ChocolateyCommunityFeedPushSource, ApplicationParameters.ChocolateyCommunityFeedPushSourceOld));
}
}
Expand Down Expand Up @@ -130,13 +130,13 @@ public virtual void handle_validation(ChocolateyConfiguration configuration)
{
string errorMessage =
@"WARNING! The specified source '{0}' is not secure.
Sending apikey over insecure channels leaves your data susceptible to
Sending apikey over insecure channels leaves your data susceptible to
hackers. Please update your source to a more secure source and try again.
Use --force if you understand the implications of this warning or are
accessing an internal feed. If you are however doing this against an
Use --force if you understand the implications of this warning or are
accessing an internal feed. If you are however doing this against an
internet feed, then the choco gods think you are crazy. ;-)
NOTE: For chocolatey.org, you must update the source to be secure.".format_with(configuration.Sources);
throw new ApplicationException(errorMessage);
}
Expand All @@ -147,16 +147,16 @@ public virtual void help_message(ChocolateyConfiguration configuration)
{
this.Log().Info(ChocolateyLoggers.Important, "Push Command");
this.Log().Info(@"
Chocolatey will attempt to push a compiled nupkg to a package feed.
Chocolatey will attempt to push a compiled nupkg to a package feed.
Some may prefer to use `cpush` as a shortcut for `choco push`.
NOTE: 100% compatible with older chocolatey client (0.9.8.32 and below)
with options and switches. Default push location is deprecated and
will be removed by v1. In most cases you can still pass options and
switches with one dash (`-`). For more details, see
with options and switches. Default push location is deprecated and
will be removed by v1. In most cases you can still pass options and
switches with one dash (`-`). For more details, see
the command reference (`choco -?`).
A feed can be a local folder, a file share, the community feed
A feed can be a local folder, a file share, the community feed
({0}), or a custom/private feed. For web
feeds, it has a requirement that it implements the proper OData
endpoints required for NuGet packages.
Expand All @@ -167,7 +167,7 @@ the command reference (`choco -?`).
choco push [<path to nupkg>] [<options/switches>]
cpush [<path to nupkg>] [<options/switches>]
NOTE: If there is more than one nupkg file in the folder, the command
NOTE: If there is more than one nupkg file in the folder, the command
will require specifying the path to the file.
");

Expand All @@ -177,26 +177,26 @@ will require specifying the path to the file.
choco push --source ""'https://chocolatey.org/'"" -t 500
choco push --source ""'https://chocolatey.org/'"" -k=""'123-123123-123'""
NOTE: See scripting in the command reference (`choco -?`) for how to
NOTE: See scripting in the command reference (`choco -?`) for how to
write proper scripts and integrations.
");

"chocolatey".Log().Info(ChocolateyLoggers.Important, "Troubleshooting");
"chocolatey".Log().Info(()=> @"
To use this command, you must have your API key saved for the community
feed (chocolatey.org) or the source you want to push to. Or you can
explicitly pass the apikey to the command. See `apikey` command help
feed (chocolatey.org) or the source you want to push to. Or you can
explicitly pass the apikey to the command. See `apikey` command help
for instructions on saving your key:
choco apikey -?
A common error is `Failed to process request. 'The specified API key
does not provide the authority to push packages.' The remote server
returned an error: (403) Forbidden..` This means the package already
exists with a different user (API key). The package could be unlisted.
You can verify by going to {0}packages/packageName.
Please contact the administrators of {0} if you see this
A common error is `Failed to process request. 'The specified API key
does not provide the authority to push packages.' The remote server
returned an error: (403) Forbidden..` This means the package already
exists with a different user (API key). The package could be unlisted.
You can verify by going to {0}packages/packageName.
Please contact the administrators of {0} if you see this
and you don't see a good reason for it.
".format_with(ApplicationParameters.ChocolateyCommunityFeedPushSource));

Expand All @@ -208,8 +208,8 @@ Exit codes that normally result from running this command.
- 0: operation was successful, no issues detected
- -1 or 1: an error has occurred
If you find other exit codes that we have not yet documented, please
file a ticket so we can document it at
If you find other exit codes that we have not yet documented, please
file a ticket so we can document it at
https://github.com/chocolatey/choco/issues/new/choose.
");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace chocolatey.infrastructure.app.commands
using resources;
#endif

[CommandFor("unpackself", "have chocolatey set itself up")]
[CommandFor("unpackself", "re-installs Chocolatey base files")]
public class ChocolateyUnpackSelfCommand : ICommand
{
private readonly IFileSystem _fileSystem;
Expand Down

0 comments on commit 5daade7

Please sign in to comment.