mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 06:54:13 +08:00
bun format
This commit is contained in:
@@ -114,9 +114,9 @@ export function prepareRunConfig(
|
|||||||
// Parse and append custom arguments (these can override the above)
|
// Parse and append custom arguments (these can override the above)
|
||||||
if (options.claudeArgs && options.claudeArgs.trim() !== "") {
|
if (options.claudeArgs && options.claudeArgs.trim() !== "") {
|
||||||
const parsed = parseShellArgs(options.claudeArgs);
|
const parsed = parseShellArgs(options.claudeArgs);
|
||||||
// shell-quote returns an array that can contain strings and objects
|
const customArgs = parsed.filter(
|
||||||
// We only want string arguments
|
(arg): arg is string => typeof arg === "string",
|
||||||
const customArgs = parsed.filter((arg): arg is string => typeof arg === "string");
|
);
|
||||||
claudeArgs.push(...customArgs);
|
claudeArgs.push(...customArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ describe("shell-quote parseShellArgs", () => {
|
|||||||
test("should filter out non-string results", () => {
|
test("should filter out non-string results", () => {
|
||||||
// shell-quote can return objects for operators like | > < etc
|
// shell-quote can return objects for operators like | > < etc
|
||||||
const result = parseShellArgs("echo hello");
|
const result = parseShellArgs("echo hello");
|
||||||
const filtered = result.filter(arg => typeof arg === "string");
|
const filtered = result.filter((arg) => typeof arg === "string");
|
||||||
expect(filtered).toEqual(["echo", "hello"]);
|
expect(filtered).toEqual(["echo", "hello"]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -28,7 +28,6 @@ jobs:
|
|||||||
# Option 3: Override output format and add custom system prompt
|
# Option 3: Override output format and add custom system prompt
|
||||||
# prompt: "Fix the failing tests"
|
# prompt: "Fix the failing tests"
|
||||||
# claude_args: "--output-format json --system-prompt 'You are an expert test fixer'"
|
# claude_args: "--output-format json --system-prompt 'You are an expert test fixer'"
|
||||||
|
|
||||||
# How it works:
|
# How it works:
|
||||||
# The action will execute: claude -p --verbose --output-format stream-json [your claude_args]
|
# The action will execute: claude -p --verbose --output-format stream-json [your claude_args]
|
||||||
# Where the prompt is piped via stdin
|
# Where the prompt is piped via stdin
|
||||||
|
|||||||
Reference in New Issue
Block a user