Code Review
/
src
/
xds
/
xds-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
64ed54b
)
Auto add var named CLIENT_PROJECT_DIR to environment.
author
Sebastien Douheret
<sebastien.douheret@iot.bzh>
Thu, 15 Jun 2017 14:28:07 +0000
(16:28 +0200)
committer
Sebastien Douheret
<sebastien.douheret@iot.bzh>
Thu, 15 Jun 2017 14:28:07 +0000
(16:28 +0200)
lib/apiv1/exec.go
patch
|
blob
|
history
diff --git
a/lib/apiv1/exec.go
b/lib/apiv1/exec.go
index
675f6fb
..
4994b27
100644
(file)
--- a/
lib/apiv1/exec.go
+++ b/
lib/apiv1/exec.go
@@
-184,6
+184,9
@@
func (s *APIService) execCmd(c *gin.Context) {
cmd = append(cmd, args.Args...)
}
+ // Append client project dir to environment
+ args.Env = append(args.Env, "CLIENT_PROJECT_DIR="+prj.RelativePath)
+
s.log.Debugf("Execute [Cmd ID %d]: %v", cmdID, cmd)
data := make(map[string]interface{})