|
|
@ -22,9 +22,8 @@ export const setup = async ({ path }) => { |
|
|
|
const run = async cmd => { |
|
|
|
const run = async cmd => { |
|
|
|
const cmdPath = isAbsolute(cmd) ? cmd : join(dir, cmd) |
|
|
|
const cmdPath = isAbsolute(cmd) ? cmd : join(dir, cmd) |
|
|
|
const { stdout } = await exec(`node ${path} ${cmdPath}`) |
|
|
|
const { stdout } = await exec(`node ${path} ${cmdPath}`) |
|
|
|
const fileContent = await readFile(`vip.txt`, 'utf8').catch(err => |
|
|
|
const fileContent = await readFile(`vip.txt`, 'utf8') |
|
|
|
err.code === 'ENOENT' ? 'output file not found' : err, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
return { data: fileContent } |
|
|
|
return { data: fileContent } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|