One more error fix in the server command

And some other small code clean-up.

See #1502
This commit is contained in:
Anthony Fok
2015-12-02 11:56:36 -07:00
parent c5287e7817
commit d48781badf
8 changed files with 26 additions and 23 deletions

View File

@@ -22,14 +22,14 @@ import (
)
func init() {
check.AddCommand(limit)
checkCmd.AddCommand(limit)
}
var limit = &cobra.Command{
Use: "ulimit",
Short: "Check system ulimit settings",
Long: `Hugo will inspect the current ulimit settings on the system.
This is primarily to ensure that Hugo can watch enough files on some OSs`,
This is primarily to ensure that Hugo can watch enough files on some OSs`,
RunE: func(cmd *cobra.Command, args []string) error {
var rLimit syscall.Rlimit
err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit)