add exec method to smartshell class

This commit is contained in:
Philipp Kunz 2017-03-11 02:36:27 +01:00
parent 4779c7107f
commit a59897ae6d
3 changed files with 25 additions and 1 deletions

View File

@ -15,6 +15,11 @@ export declare class Smartshell {
* @param commandArg * @param commandArg
*/ */
execSilent(commandArg: string): Promise<smartshellWrap.IExecResult>; execSilent(commandArg: string): Promise<smartshellWrap.IExecResult>;
/**
* executes and returns IExecResult
* @param commandArg
*/
exec(commandArg: string): Promise<smartshellWrap.IExecResult>;
/** /**
* creates the final sourcing string * creates the final sourcing string
* @param commandArg * @param commandArg

View File

@ -35,6 +35,16 @@ class Smartshell {
return yield smartshellWrap.execSilent(commandArg); return yield smartshellWrap.execSilent(commandArg);
}); });
} }
/**
* executes and returns IExecResult
* @param commandArg
*/
exec(commandArg) {
return __awaiter(this, void 0, void 0, function* () {
let execCommand = this.createExecString(commandArg);
return yield smartshellWrap.exec(commandArg);
});
}
/** /**
* creates the final sourcing string * creates the final sourcing string
* @param commandArg * @param commandArg
@ -53,4 +63,4 @@ class Smartshell {
} }
} }
exports.Smartshell = Smartshell; exports.Smartshell = Smartshell;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzaGVsbC5jbGFzc2VzLnNtYXJ0c2hlbGwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHNoZWxsLmNsYXNzZXMuc21hcnRzaGVsbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQ0Esb0RBQW1EO0FBVW5EO0lBR0UsWUFBYSxVQUF3QztRQURyRCxvQkFBZSxHQUFhLEVBQUUsQ0FBQTtRQUU1QixJQUFJLENBQUMsUUFBUSxHQUFHLFVBQVUsQ0FBQyxRQUFRLENBQUE7UUFDbkMsR0FBRyxDQUFDLENBQUMsSUFBSSxjQUFjLElBQUksVUFBVSxDQUFDLGVBQWUsQ0FBQyxDQUFDLENBQUM7WUFDd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QUMsVUFBVSxDQUFDLFVBQVUsQ0FBQyxDQUFBO1FBQ3BELENBQUM7S0FBQTtJQUVEOzs7T0FHRztJQUNHLElBQUksQ0FBRSxVQUFrQjs7WUFDNUIsSUFBSSxXQUFXLEdBQUcsSUFBSSxDQUFDLGdCQUFnQixDQUFDLFVBQVUsQ0FBQyxDQUFBO1lBQ25ELE1BQU0sQ0FBQyxNQUFNLGNBQWMsQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLENBQUE7UUFDOUMsQ0FBQztLQUFBO0lBRUQ7OztPQUdHO0lBQ0ssZ0JBQWdCLENBQUUsVUFBVTtRQUNsQyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsUUFBUSxLQUFLLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDN0IsSUFBSSxZQUFZLEdBQUcsRUFBRSxDQUFBO1lBQ3JCLEdBQUcsQ0FBQyxDQUFDLElBQUksY0FBYyxJQUFJLElBQUksQ0FBQyxlQUFlLENBQUMsQ0FBQyxDQUFDO2dCQUNoRCxZQUFZLEdBQUcsWUFBWSxHQUFHLFVBQVUsY0FBYyxNQUFNLENBQUE7WUFDOUQsQ0FBQztZQUNELE1BQU0sQ0FBQyxZQUFZLFlBQVksSUFBSSxVQUFVLEdBQUcsQ0FBQTtRQUNsRCxDQUFDO1FBQUMsSUFBSSxDQUFDLENBQUM7WUFDTixNQUFNLENBQUMsVUFBVSxDQUFBO1FBQ25CLENBQUM7SUFDSCxDQUFDO0NBQ0Y7QUFyREQsZ0NBcURDIn0=

View File

@ -38,6 +38,15 @@ export class Smartshell {
return await smartshellWrap.execSilent(commandArg) return await smartshellWrap.execSilent(commandArg)
} }
/**
* executes and returns IExecResult
* @param commandArg
*/
async exec (commandArg: string) {
let execCommand = this.createExecString(commandArg)
return await smartshellWrap.exec(commandArg)
}
/** /**
* creates the final sourcing string * creates the final sourcing string
* @param commandArg * @param commandArg