diff --git a/dist/index.js b/dist/index.js index a2f2047..5302318 100644 --- a/dist/index.js +++ b/dist/index.js @@ -42,11 +42,20 @@ class ExecStack { .concat(resolverArgs) .concat(args); } - async exec(args) { - return await exec.exec("stack", this.stackArguments.concat(args)); + async exec(args, options) { + return await exec.exec("stack", this.stackArguments.concat(args), options); } - async read(_args) { - return "TODO"; + async read(args) { + let stdout = ""; + const options = { + listeners: { + stdout: (data) => { + stdout += data.toString(); + }, + }, + }; + await this.exec(args, options); + return stdout; } async parse(args, f) { const stdout = await this.read(args);