import * as step from "../../src/index" async function run() { const shellName = "ls" const args = ["-l", "-a"] step.infoCyan(`exec command: ${shellName} ${args.join(" ")}`) const exitCode = await step.exec.call(shellName, args, { listener: { stdoutLine: (line: string) => { step.info(line) }, stderrLine: (line: string) => { step.error(line) } } }) if (exitCode !== 0) { step.error(`exit code: ${exitCode}`) } else { step.success(`exit code: ${exitCode}`) } } run()