Merge pull request #16 from bbenoist/feature/ssh-bootstrap

Add an option to execute additional commands before GDB when using SSH
This commit is contained in:
Jan 2016-02-10 22:01:26 +01:00
commit 517870e1b8
4 changed files with 15 additions and 2 deletions

View file

@ -93,7 +93,9 @@ export class MI2 extends EventEmitter implements IBackend {
screen: args.remotex11screen
};
}
this.sshConn.exec(this.application + " " + this.preargs.join(" "), execArgs, (err, stream) => {
let sshCMD = this.application + " " + this.preargs.join(" ");
if (args.bootstrap) sshCMD = args.bootstrap + " && " + sshCMD;
this.sshConn.exec(sshCMD, execArgs, (err, stream) => {
if (err) {
this.log("stderr", "Could not run " + this.application + " over ssh!");
this.log("stderr", err.toString());