From 2fef00962d1999da698f83a1253e1c466e9b67a5 Mon Sep 17 00:00:00 2001 From: xizhao Date: Fri, 16 Feb 2018 23:51:09 -0800 Subject: [PATCH] docs(test): properly document test cmd --- cmd/fossa/main.go | 5 ++--- docs/user-guide.md | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/fossa/main.go b/cmd/fossa/main.go index 98f48078cd..95603aaecc 100644 --- a/cmd/fossa/main.go +++ b/cmd/fossa/main.go @@ -2,7 +2,6 @@ package main import ( "encoding/json" - "errors" "fmt" "os" "path/filepath" @@ -93,7 +92,7 @@ func main() { cli.StringFlag{Name: "p, project", Usage: projectUsage}, cli.StringFlag{Name: "r, revision", Usage: revisionUsage}, cli.StringFlag{Name: "e, endpoint", Usage: endpointUsage}, - cli.IntFlag{Name: "t, timeout", Usage: "timeout for waiting for build status; defaults to 30m", Value: 1000 * 60 * 30}, + cli.IntFlag{Name: "t, timeout", Usage: "timeout for waiting for build status in seconds; defaults to 10m", Value: 60 * 10}, cli.BoolFlag{Name: "debug", Usage: debugUsage}, }, }, @@ -340,7 +339,7 @@ func resolveModuleConfig(moduleConfig moduleConfig) (module.Builder, module.Modu } default: mainLogger.Debug("Got unknown module.") - return builder, m, errors.New("unknown module type: " + string(moduleConfig.Type)) + return builder, m, fmt.Errorf("unknown module type: %s", moduleConfig.Type) } mainLogger.Debugf("Resolved moduleConfig to: %#v, %#v", builder, m) diff --git a/docs/user-guide.md b/docs/user-guide.md index 78a20e32ba..227aeba9a9 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -116,6 +116,9 @@ Print the version, then exit. #### `-h, --help` Print a help message, then exit. +#### `-t, --timeout` +Passed to `fossa test` to specify a test timeout (seconds). +