Browse Source

Chore(trace): print trace for one-off task

SukkaW 1 year ago
parent
commit
7b3d422df6
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Build/trace/index.ts

+ 3 - 0
Build/trace/index.ts

@@ -104,6 +104,9 @@ export function task(importMetaMain: boolean, importMetaPath: string) {
     const dummySpan = createSpan(taskName);
     if (importMetaMain) {
       fn(dummySpan).finally(() => {
+        dummySpan.stop();
+        printTraceResult(dummySpan.traceResult);
+
         console.log(wtf.dump());
       });
     }