We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40d8f04 commit a76f0edCopy full SHA for a76f0ed
tool.go
@@ -223,7 +223,10 @@ func main() {
223
return fmt.Errorf("gopherjs run: no go files listed")
224
}
225
226
- tempfile, err := ioutil.TempFile("", filepath.Base(args[0])+".")
+ tempfile, err := ioutil.TempFile(currentDirectory, filepath.Base(args[0])+".")
227
+ if err != nil && strings.HasPrefix(currentDirectory, runtime.GOROOT()) {
228
+ tempfile, err = ioutil.TempFile("", filepath.Base(args[0])+".")
229
+ }
230
if err != nil {
231
return err
232
@@ -363,7 +366,7 @@ func main() {
363
366
364
367
365
368
- tempfile, err := ioutil.TempFile("", "test.")
369
+ tempfile, err := ioutil.TempFile(currentDirectory, "test.")
370
371
372
0 commit comments