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.
2 parents 8497b78 + a76f0ed commit f15a4acCopy full SHA for f15a4ac
tool.go
@@ -233,7 +233,10 @@ func main() {
233
return fmt.Errorf("gopherjs run: no go files listed")
234
}
235
236
- tempfile, err := ioutil.TempFile("", filepath.Base(args[0])+".")
+ tempfile, err := ioutil.TempFile(currentDirectory, filepath.Base(args[0])+".")
237
+ if err != nil && strings.HasPrefix(currentDirectory, runtime.GOROOT()) {
238
+ tempfile, err = ioutil.TempFile("", filepath.Base(args[0])+".")
239
+ }
240
if err != nil {
241
return err
242
@@ -373,7 +376,7 @@ func main() {
373
376
374
377
375
378
- tempfile, err := ioutil.TempFile("", "test.")
379
+ tempfile, err := ioutil.TempFile(currentDirectory, "test.")
380
381
382
0 commit comments