Skip to content

Commit 4188abb

Browse files
committed
fix(cli): add logging for command execution in RunCmd
- Introduced `logger` to log executed commands and arguments for better debugging and visibility.
1 parent f2a7ae6 commit 4188abb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/cli/src/commands/run/RunCmd.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {CliFs, command, type CommandProvider, inject, normalizePath, ProjectPackageJson, type Tasks} from "@tsed/cli-core";
2+
import {logger} from "@tsed/di";
23

34
import {CliRunScript} from "../../services/CliRunScript.js";
45

@@ -18,6 +19,8 @@ export class RunCmd implements CommandProvider {
1819
const args = ["--import", "@swc-node/register/esm-register"];
1920
const path = normalizePath("src/bin/index.ts");
2021

22+
logger().info(`Run ${cmd} ${[...args, path, ctx.command, ...ctx.rawArgs].join(" ")}`);
23+
2124
await this.runScript.run(cmd, [...args, path, ctx.command, ...ctx.rawArgs], {
2225
env: process.env
2326
});

0 commit comments

Comments
 (0)