gin icon indicating copy to clipboard operation
gin copied to clipboard

Unable to run when binary is on /tmp folder

Open kokizzu opened this issue 10 years ago • 1 comments

Purpose: reduce write on disk (/tmp is RAM)

Shell script

gin -i -b "/tmp/gin-bin" "go build test.go && ./tmp/gin-bin"

the output

2014/12/10 15:45:16 http: proxy error: dial tcp 127.0.0.1:3001: connection refused

kokizzu avatar Dec 10 '14 08:12 kokizzu

Possible workaround:

main.go line 93

    runpath := builder.Binary()
    if runpath[0] != '/' {
        runpath = filepath.Join(wd, runpath)
    }
    runner := gin.NewRunner(runpath, c.Args()...)

kokizzu avatar Dec 10 '14 09:12 kokizzu