Skip to content

Commit fc8aafc

Browse files
committed
Adds default cmd='bash' to execShellScript
1 parent f84ca73 commit fc8aafc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/util/sh.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import * as ChildProcess from 'child_process'
33
/**
44
* Execute the following sh program.
55
*/
6-
export function execShellScript(body: string): Promise<string> {
6+
export function execShellScript(body: string, cmd = 'bash'): Promise<string> {
77
const args = ['-c', body]
8-
const process = ChildProcess.spawn('bash', args)
8+
const process = ChildProcess.spawn(cmd, args)
99

1010
return new Promise((resolve, reject) => {
1111
let output = ''

0 commit comments

Comments
 (0)