Skip to content

Commit

Permalink
(chocolateyGH-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 Russell Mora committed Jan 23, 2017
1 parent 88d2a74 commit 9c2321c
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 9c2321c

Please sign in to comment.