diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-08-24 17:09:57 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-08-24 17:09:57 +0200 |
commit | 2fed63ed0087df0c79f7f30f7f397611381bfccd (patch) | |
tree | e7bf6be2ccf18ca392b74619e8d11981264f9cfc /lib/apiv1 | |
parent | 6691c9f7c53dc765b5a333a2db84ce692bd2b44d (diff) |
Fixed /exec command (don't prefix command with exec binary).
adding 'exec' prevents to use "script" syntax:
xds-exec -c xds-config.env -- "cd build && cmake .."
But 'exec' binary is mandatory to allow to pass correctly signals to subprocess such as gdb.
As workaround, exec is set for now on client side (eg. in xds-gdb).
Diffstat (limited to 'lib/apiv1')
-rw-r--r-- | lib/apiv1/exec.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/apiv1/exec.go b/lib/apiv1/exec.go index 4a591be..6300dba 100644 --- a/lib/apiv1/exec.go +++ b/lib/apiv1/exec.go @@ -135,10 +135,13 @@ func (s *APIService) execCmd(c *gin.Context) { } } - // FIXME - SEB: exec prevents to use syntax: - // xds-exec -l debug -c xds-config.env -- "cd build && cmake .." cmd = append(cmd, "cd", folder.GetFullPath(args.RPath)) - cmd = append(cmd, "&&", "exec", args.Cmd) + // FIXME - add 'exec' prevents to use syntax: + // xds-exec -l debug -c xds-config.env -- "cd build && cmake .." + // but exec is mandatory to allow to pass correctly signals + // As workaround, exec is set for now on client side (eg. in xds-gdb) + //cmd = append(cmd, "&&", "exec", args.Cmd) + cmd = append(cmd, "&&", args.Cmd) // Process command arguments cmdArgs := make([]string, len(args.Args)+1) |