Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gorun is not working for go 1.9.4 or more #12

Closed
nicetip opened this issue Feb 28, 2018 · 2 comments
Closed

gorun is not working for go 1.9.4 or more #12

nicetip opened this issue Feb 28, 2018 · 2 comments

Comments

@nicetip
Copy link

nicetip commented Feb 28, 2018

like title, it's not working for go 1.9.4 and 1.10
following is error message.

can't load package: package main: invalid input file name "%home%myaccount%test.go.gorun.9326.go"
error: failed to run go: exit status 1

@s5unty
Copy link

s5unty commented Mar 10, 2018

golang/go/issues/24213

For safety, we banned files starting with anything other than letters, digits, dot, underscore, and slash.

 gorun.go | 1 +
 1 file changed, 1 insertion(+)

diff --git gorun.go gorun.go
index aa855cb..8b28033 100644
--- gorun.go
+++ gorun.go
@@ -172,6 +172,7 @@ func RunFile(sourcefile string) (rundir, runfile string, err error) {
 		return "", "", err
 	}
 	runfile = strings.Replace(sourcefile, "%", "%%", -1)
+	runfile = strings.Replace(runfile, string(filepath.Separator), "ROOT%", 1)
 	runfile = strings.Replace(runfile, string(filepath.Separator), "%", -1)
 	runfile = filepath.Join(rundir, runfile)
 	runfile += ".gorun"
`

@erning
Copy link
Owner

erning commented Apr 8, 2018

#13

@erning erning closed this as completed Apr 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants