I try set TMP="c:\My Program Files"
go run -x src\cmd\mytweeter\main.go
mkdir C:\My Program Files\dev\tmp\"C:\My Program
Files\tmp"\go-build740794887: The filename, directory name, or volume label
syntax is incorrect.
But it seems that go run try to mkdir C:\My Program Files\dev\tmp\"C:\My
Program Files\tmp"\go-build740794887...
Any tips ?
Le mardi 13 octobre 2015 16:25:49 UTC+2, Konstantin Khomoutov a écrit :
On Tue, 13 Oct 2015 07:03:09 -0700 (PDT)
Jérôme LAFORGE <jerome....@gmail.com <javascript:>> wrote:
TMP environment variable instead.
You can easily figure the correct variable to use yourself by running
the `go run` command with the "-x" command-line variable and looking at
whether what you do changes anything.
Basically, I rolled like this:
go run -x main.go
...
set <- this is to see the list of the env. variables
mkdir foo
set TEMP=foo
go run -x main.go
... okay, no luck
set TMP=foo
go run -x main.go
... good, my temp directory gets used.
On a side note, please consider that `go run` should not really be used
for anything except the most trivial throwaway code. Use `go install`
instead. Or at least `go build`.
--Jérôme LAFORGE <jerome....@gmail.com <javascript:>> wrote:
Hello all,
With go run, it is possible to define which directory is used for
running the program.
Some colleague of mine use Windows as development platform with
security restrictions that are defined by our policy group.
One of them is : a program can be only executed into specific
directory. And so the directory "C:\Users\<id>\AppData\Local\Temp\"
is not allowed.
I try TMPDIR
(https://groups.google.com/forum/#!topic/golang-nuts/Kwuto2AzsKo) but
that doesn't work.
Can we overwrite the temporary directory where go run will execute
the program?
My old Go installation (1.4.2 on 32-bit Windows XP) appears to use theWith go run, it is possible to define which directory is used for
running the program.
Some colleague of mine use Windows as development platform with
security restrictions that are defined by our policy group.
One of them is : a program can be only executed into specific
directory. And so the directory "C:\Users\<id>\AppData\Local\Temp\"
is not allowed.
I try TMPDIR
(https://groups.google.com/forum/#!topic/golang-nuts/Kwuto2AzsKo) but
that doesn't work.
Can we overwrite the temporary directory where go run will execute
the program?
TMP environment variable instead.
You can easily figure the correct variable to use yourself by running
the `go run` command with the "-x" command-line variable and looking at
whether what you do changes anything.
Basically, I rolled like this:
go run -x main.go
...
set <- this is to see the list of the env. variables
mkdir foo
set TEMP=foo
go run -x main.go
... okay, no luck
set TMP=foo
go run -x main.go
... good, my temp directory gets used.
On a side note, please consider that `go run` should not really be used
for anything except the most trivial throwaway code. Use `go install`
instead. Or at least `go build`.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.