Skip to content

Commit d45fd15

Browse files
committed
add pythonExtension's runInline
1 parent 6878466 commit d45fd15

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/build/src/extensions/python.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,9 @@ export const run = async (scriptArgs: string[] = [], options: Parameters<typeof
116116
return result;
117117
};
118118

119-
export default run;
119+
export const runInline = (scriptContent: string, options: Parameters<typeof $>[1] = {}) => {
120+
assert(scriptContent, "Script content is required");
121+
return run([""], { input: scriptContent, ...options });
122+
};
123+
124+
export default { run, runInline };

0 commit comments

Comments
 (0)