Skip to content

Commit

Permalink
fix #956
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Dec 19, 2024
1 parent 85c5a21 commit 98e08e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/cli/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ import {
import { ensureDotGenaiscriptPath, setupTraceWriting } from "./trace"
import { applyModelOptions } from "./modealias"
import { createCancellationController } from "./cancel"
import { parsePromptScriptMeta } from "../../core/src/template"

export async function runScriptWithExitCode(
scriptId: string,
Expand Down Expand Up @@ -142,6 +143,7 @@ export async function runScriptInternal(
}
): Promise<{ exitCode: number; result?: GenerationResult }> {
const { trace = new MarkdownTrace(), infoCb, partialCb } = options || {}

let result: GenerationResult
const excludedFiles = options.excludedFiles
const excludeGitIgnore = !!options.excludeGitIgnore
Expand Down Expand Up @@ -242,6 +244,7 @@ export async function runScriptInternal(
if (jsSource)
prj.scripts.push({
id: scriptId,
...parsePromptScriptMeta(jsSource),
jsSource,
})
const script = prj.scripts.find(
Expand Down

0 comments on commit 98e08e6

Please sign in to comment.