mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 06:54:13 +08:00
formatting
This commit is contained in:
@@ -90,20 +90,16 @@ export async function setupClaudeCodeSettings(
|
||||
await $`test -d ${projectAgentsDir}`.quiet();
|
||||
console.log(`Found project agents directory at ${projectAgentsDir}`);
|
||||
|
||||
// Ensure target agents directory exists
|
||||
await $`mkdir -p ${claudeAgentsDir}`.quiet();
|
||||
|
||||
// Copy all .md files from project agents to Claude's agents directory
|
||||
await $`cp ${projectAgentsDir}/*.md ${claudeAgentsDir}/ 2>/dev/null || true`.quiet();
|
||||
|
||||
// Count copied agents for logging
|
||||
const agentFiles = await $`ls ${claudeAgentsDir}/*.md 2>/dev/null | wc -l`
|
||||
.quiet()
|
||||
.text();
|
||||
const agentCount = parseInt(agentFiles.trim()) || 0;
|
||||
console.log(`Copied ${agentCount} agent(s) to ${claudeAgentsDir}`);
|
||||
} catch (e) {
|
||||
// Directory doesn't exist or no agents to copy - this is expected in most cases
|
||||
console.log(`No project agents directory found at ${projectAgentsDir}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user