Sha256: 4b463752ab13ef29663505f6c0d3fe9887b1d93416df663b0c193453f0b80e11

Contents?: true

Size: 506 Bytes

Versions: 3

Compression:

Stored size: 506 Bytes

Contents

import { exec } from 'child_process'
import { promisify } from 'util'

function execPipeline(command: string, onMessage: (stdout: string | null, stderr: string | null) => void, callback: (error: Error) => void) {
    const process = exec(command, callback)
    process.stdout.on('data', (data) => onMessage(data.toString(), null))
    process.stderr.on('data', (data) => onMessage(null, data.toString()))
}

export const asyncExecPipeline = promisify(execPipeline)
export const asyncExec = promisify(exec)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yoda-language-server-0.10.1 client/vscode/src/utils.ts
yoda-language-server-0.10.0 client/vscode/src/utils.ts
yoda-language-server-0.9.0 client/vscode/src/utils.ts