go-aah / aah

A secure, flexible, rapid Go web framework
https://aahframework.org
MIT License
691 stars 33 forks source link

run aah new will hung in the %GOPATH%\src #201

Closed mei-rune closed 6 years ago

mei-rune commented 6 years ago

What version of aah are you using (aah --version)?

cli v0.12.0 aahVersion entry aahVersion 2 go v1.10.1

Does this issue reproduce with the latest release?

set GOPATH=c:\xxxx cd c:\xxxx\src aah new

What operating system are you using (such as macOS, Linux and Windows)?

Windows

bug is https://github.com/go-aah/tools/blob/v0-edge/aah/util.go#L31 Patch as follow

diff --git a/aah/util.go b/aah/util.go
index 6591c22..d287629 100644
--- a/aah/util.go
+++ b/aah/util.go
@@ -39,13 +39,13 @@ func importPathRelwd() string {
                        if ess.IsFileExists(filepath.Join(appDir, aahProjectIdentifier)) {
                                importPath, _ = filepath.Rel(srcDir, appDir)
                                break
-                       } else {
-                               appDir = filepath.Dir(appDir)
                        }

                        if appDir == srcDir {
                                break
                        }
+
+                       appDir = filepath.Dir(appDir)
                }
        }
jeevatkm commented 6 years ago

@runner-mei Thank you for reporting bug. You have mentioned diff nicely, I would like to clarify. Are you gonna send PR or Shall I apply as per diff?