From 3716f6d7e9765451c80cb3e92c0825e22a3b136f Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 22 Oct 2020 14:42:23 +0100 Subject: [PATCH] Improve error messages --- extractor/cli/go-autobuilder/go-autobuilder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extractor/cli/go-autobuilder/go-autobuilder.go b/extractor/cli/go-autobuilder/go-autobuilder.go index 8cdd0adeff9..8a2b4a67f6a 100644 --- a/extractor/cli/go-autobuilder/go-autobuilder.go +++ b/extractor/cli/go-autobuilder/go-autobuilder.go @@ -216,7 +216,7 @@ func getOsToolsSubdir() (string, error) { case "windows": return "win64", nil } - return "", errors.New("Unknown OS: " + runtime.GOOS) + return "", errors.New("Unsupported OS: " + runtime.GOOS) } func getExtractorDir() (string, error) { @@ -229,7 +229,7 @@ func getExtractorDir() (string, error) { // Fall back to rebuilding our own path from the extractor root: extractorRoot := os.Getenv("CODEQL_EXTRACTOR_GO_ROOT") if extractorRoot == "" { - return "", errors.New("CODEQL_EXTRACTOR_GO_ROOT not set") + return "", errors.New("CODEQL_EXTRACTOR_GO_ROOT not set.\nThis binary should not be run manually; instead, use the CodeQL CLI or VSCode extension. See https://securitylab.github.com/tools/codeql") } osSubdir, err := getOsToolsSubdir()