diff options
| author | Jeff Carr <[email protected]> | 2024-12-13 20:32:07 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-13 20:32:07 -0600 |
| commit | 1c8f55d397acb6b653d83f050d15329d7de33bfd (patch) | |
| tree | ebf6830cf93235c2eda427a90c09aae9fdf60c9b /main.go | |
| parent | d1708d6a4bea44c9935e0b26e7d3e3a209c3b4b1 (diff) | |
move checks to panic in safer placesv0.22.36
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -4,6 +4,7 @@ import ( "embed" "os" "path/filepath" + "strings" "go.wit.com/dev/alexflint/arg" "go.wit.com/gui" @@ -111,10 +112,13 @@ func main() { } } - me.startRepo = me.forge.Repos.FindByGoPath("go.wit.com/apps/helloworld") + pwd, _ := os.Getwd() + basedir := strings.TrimPrefix(pwd, me.forge.GetGoSrc()) + basedir = strings.Trim(basedir, "/") + me.startRepo = me.forge.Repos.FindByGoPath(basedir) if me.startRepo == nil { - log.Info("Can not release if guireleaser was not found") + log.Info("Can not run if pwd is not a repo", basedir) os.Exit(0) } me.Enable() |
