From 01ccd695d4e0d70505a485cf2a703b7fa6473a02 Mon Sep 17 00:00:00 2001 From: NotZippy Date: Sat, 22 Sep 2018 15:28:22 -0700 Subject: [PATCH] Re added the requirement for the -a, without this the flags would not error out and cause issues --- harness/build.go | 2 +- model/command_config.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/harness/build.go b/harness/build.go index 2b94a88..65299ed 100644 --- a/harness/build.go +++ b/harness/build.go @@ -243,7 +243,7 @@ func Build(c *model.CommandConfig, paths *model.RevelContainer) (app *App, compi utils.Logger.Info("Exec:", "args", getCmd.Args) getOutput, err := getCmd.CombinedOutput() if err != nil { - utils.Logger.Error("Build failed", "message", stOutput) + utils.Logger.Error("Build failed", "message", stOutput, "error", err) utils.Logger.Error("Failed to fetch the output", "getOutput", string(getOutput)) return nil, newCompileError(paths, output) } diff --git a/model/command_config.go b/model/command_config.go index a3ccc4d..e7f6ae6 100644 --- a/model/command_config.go +++ b/model/command_config.go @@ -47,13 +47,13 @@ type ( // The build command Build struct { TargetPath string `short:"t" long:"target-path" description:"Path to target folder. Folder will be completely deleted if it exists" required:"true"` - ImportPath string `short:"a" long:"application-path" description:"Path to applicaiton folder" ` + ImportPath string `short:"a" long:"application-path" description:"Path to applicaiton folder" required:"true"` Mode string `short:"m" long:"run-mode" description:"The mode to run the application in"` CopySource bool `short:"s" long:"include-source" description:"Copy the source code as well"` } `command:"build"` // The run command Run struct { - ImportPath string `short:"a" long:"application-path" description:"Path to applicaiton folder" ` + ImportPath string `short:"a" long:"application-path" description:"Path to applicaiton folder" required:"true"` Mode string `short:"m" long:"run-mode" description:"The mode to run the application in"` Port string `short:"p" long:"port" description:"The port to listen"` NoProxy bool `short:"n" long:"no-proxy" description:"True if proxy server should not be started. This will only update the main and routes files on change"` @@ -61,17 +61,17 @@ type ( // The package command Package struct { Mode string `short:"m" long:"run-mode" description:"The mode to run the application in"` - ImportPath string `short:"a" long:"application-path" description:"Path to applicaiton folder" ` + ImportPath string `short:"a" long:"application-path" description:"Path to applicaiton folder" required:"true"` CopySource bool `short:"s" long:"include-source" description:"Copy the source code as well"` } `command:"package"` // The clean command Clean struct { - ImportPath string `short:"a" long:"application-path" description:"Path to applicaiton folder" ` + ImportPath string `short:"a" long:"application-path" description:"Path to applicaiton folder" required:"true"` } `command:"clean"` // The test command Test struct { Mode string `short:"m" long:"run-mode" description:"The mode to run the application in"` - ImportPath string `short:"a" long:"application-path" description:"Path to applicaiton folder" ` + ImportPath string `short:"a" long:"application-path" description:"Path to applicaiton folder" required:"true"` Function string `short:"f" long:"suite-function" description:"The suite.function"` } `command:"test"` // The version command @@ -133,6 +133,6 @@ func (c *CommandConfig) UpdateImportPath() bool { } c.ImportPath = importPath - utils.Logger.Info("Returned import path", "path", importPath) + utils.Logger.Info("Returned import path", "path", importPath, "buildpath",build.Default.GOPATH) return (len(importPath) > 0 || !required) }