aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-06-15 16:28:07 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-06-15 16:28:07 +0200
commitec22c45b4adaf530c66c053cf4e9408c4f791349 (patch)
tree70b511498952047a18948b572e6332aed7ed3893 /lib
parent64ed54b54f8efe6a0fd350cfc43970eba90a4a57 (diff)
Auto add var named CLIENT_PROJECT_DIR to environment.
Diffstat (limited to 'lib')
-rw-r--r--lib/apiv1/exec.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/apiv1/exec.go b/lib/apiv1/exec.go
index 675f6fb..4994b27 100644
--- 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{})