Skip to content

Commit

Permalink
ww
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Nov 18, 2024
1 parent 8a5ca0b commit c4fe7b5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/tools/lib.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function parseCliArgs() {
}
async function run(agent, tool, command) {
const runner = await getToolRunner(agent, tool);
return await runner.run(command);
await runner.run(command);
}

export { getAgent, getToolRunner, parseCliArgs, run };
Expand Down
2 changes: 1 addition & 1 deletion dist/tools/lib.mjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions src/tools/lib.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { parseArgs } from 'node:util'

import { type ExecResult, type IBuildAgent } from '@agents/common'
import { type IBuildAgent } from '@agents/common'
import { type IRunner } from '@tools/common'

type CliArgs = {
Expand Down Expand Up @@ -32,7 +32,15 @@ export function parseCliArgs(): CliArgs {
}).values as CliArgs
}

export async function run(agent: string, tool: string, command: string): Promise<ExecResult> {
export async function run(agent: string, tool: string, command: string): Promise<void> {
const runner = await getToolRunner(agent, tool)
return await runner.run(command)
await runner.run(command)
// const { code, stdout, stderr } = await runner.run(command)
// if (stdout) {
// process.stdout.write(stdout)
// }
// if (stderr) {
// process.stderr.write(stderr)
// }
// process.exit(code)
}

0 comments on commit c4fe7b5

Please sign in to comment.