Updated Launch code

Added output to error stack, so terminal errors are displayed
Ficed c.Verbose, it was changed to an array which causes issues launching
Removed . notation from doing anything special. This was already replaced with the -p CLI option
Added documentaiton on adding the package name
Started watcher with force refresh.
This commit is contained in:
notzippy@gmail.com
2022-02-28 20:01:01 -08:00
parent ea5acb720f
commit 25dc05b31e
11 changed files with 36 additions and 18 deletions

View File

@@ -17,6 +17,9 @@ func CmdInit(c *exec.Cmd, addGoPath bool, basePath string) {
c.Env = ReducedEnv(addGoPath)
}
// ReducedEnv returns a list of environment vairables by using os.Env
// it will remove the GOPATH, GOROOT if addGoPath is true
func ReducedEnv(addGoPath bool) []string {
realPath := &bytes.Buffer{}
env := []string{}
@@ -38,7 +41,7 @@ func ReducedEnv(addGoPath bool) []string {
if pair[0] == "GOMODCACHE" {
continue
} else if !addGoPath && (pair[0] == "GOPATH" || pair[0] == "GOROOT") {
continue
}
env = append(env, e)
}