Skip to content

Commit

Permalink
(GH-1083) Display Usage When No Arguments Passed
Browse files Browse the repository at this point in the history
When a user simply runs `choco`, display a brief usage message.
This will help users who are not familiar with Chocolatey get up
to speed faster with commands and how to get help.
  • Loading branch information
Isopolito authored and ferventcoder committed Jan 21, 2017
1 parent 50621cd commit b4a24e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/chocolatey.console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ private static void Main(string[] args)
"chocolatey".Log().Info(ChocolateyLoggers.Important, () => "{0} v{1}{2}".format_with(ApplicationParameters.Name, config.Information.ChocolateyProductVersion, license.is_licensed_version() ? " {0}".format_with(license.LicenseType) : string.Empty));
}
#endif
if (args.Length == 0)
{
"chocolatley".Log().Info(ChocolateyLoggers.Important, () => "Please run 'choco -?' or 'choco <command> -?' for help menu.");
}
}

if (warnings.Count != 0 && config.RegularOutput)
Expand Down

0 comments on commit b4a24e3

Please sign in to comment.