Panic issue
Having the same issue when I try
gogs backup.i've managed to "fix" this issue by instead of running
gogs web, i just add .\ like this:.\gogs.exe web. i can only assume this works for every other gogs commmand. found the same issue in other go projects, apparently this started to happen with other golang projects compiled with go version 1.18
Originally posted by @vuksavic in #7391
I'm not sure why this issue was closed. I get the same issue in 0.13.2 and can't resolve it. The fix offered by a user at the end, make no sense to me, because windows cmd does not allow "./" to proceed an executable. It will just say this: '.' is not recognized as an internal or external command
I reverted to 0.12.11 and it works
panic: look executable path: exec: "gogs.exe": cannot run executable found relative to current directory
goroutine 1 [running]: gogs.io/gogs/internal/conf.AppPath.func1() gogs.io/gogs/internal/conf/computed.go:39 +0x114 sync.(*Once).doSlow(0x7ff7395f3fa1?, 0x0?) sync/once.go:76 +0xb4 sync.(*Once).Do(...) sync/once.go:67 gogs.io/gogs/internal/conf.AppPath() gogs.io/gogs/internal/conf/computed.go:35 +0x2c gogs.io/gogs/internal/conf.WorkDir.func1() gogs.io/gogs/internal/conf/computed.go:66 +0x59 sync.(*Once).doSlow(0xc0006388b3?, 0x7ff73b3c1100?) sync/once.go:76 +0xb4 sync.(*Once).Do(...) sync/once.go:67 gogs.io/gogs/internal/conf.WorkDir() gogs.io/gogs/internal/conf/computed.go:60 +0x2c gogs.io/gogs/internal/conf.ensureAbs({0xc0006388b3, 0x4}) gogs.io/gogs/internal/conf/utils.go:40 +0x39 gogs.io/gogs/internal/conf.Init({0xc00070c190, 0x44}) gogs.io/gogs/internal/conf/conf.go:92 +0x39c gogs.io/gogs/internal/cmd.runRestore(0xc000560b00) gogs.io/gogs/internal/cmd/restore.go:105 +0x8fc github.com/urfave/cli.HandleAction({0x7ff7393d9f80?, 0x7ff73a7bddf0?}, 0x7?) github.com/urfave/[email protected]/app.go:524 +0x50 github.com/urfave/cli.Command.Run({{0x7ff7395e57df, 0x7}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0x7ff73962af8b, 0x26}, {0x0, ...}, ...}, ...) github.com/urfave/[email protected]/command.go:175 +0x67c github.com/urfave/cli.(*App).Run(0xc000506c40, {0xc000092200, 0x3, 0x4}) github.com/urfave/[email protected]/app.go:277 +0xb3b main.main() gogs.io/gogs/gogs.go:39 +0x3ec