Skip to content

Commit

Permalink
Multiple command execution
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkar598 committed Jul 3, 2024
1 parent 044c756 commit 2f11db6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/vm/commandQueue.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,15 @@ export class CommandQueueService {
* @return {Promise<Process>}
*/
public async runProcess(
path: string,
path: string | string[],
args = '',
env = new Map<string, string>(),
): Promise<Process> {
if (Array.isArray(path)) {
args = `-e\0-u\0-o\0pipefail\0-c\0${path.join(';')}\0${args}`;
path = '/bin/sh';
}

const result = await this.queueCommand({
type: 'run',
binary: path,
Expand Down

0 comments on commit 2f11db6

Please sign in to comment.