-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Description
I have this error when scripts/update-agent-context.sh runs for copilot: scripts/update-agent-context.sh copilot
=== Updating agent context files for feature 001-build-a-secure ===
sed: 1: "s/^**Language\/Version* ...": RE error: repetition-operator operand invalid
sed: 1: "s/^**Primary Dependenci ...": RE error: repetition-operator operand invalid
sed: 1: "s/^**Testing**: //": RE error: repetition-operator operand invalid
sed: 1: "s/^**Storage**: //": RE error: repetition-operator operand invalid
sed: 1: "s/^**Project Type**: //": RE error: repetition-operator operand invalid
Updating GitHub Copilot context file: /<project-path>/.github/copilot-instructions.md
Updating existing GitHub Copilot context file...
scripts/update-agent-context.sh: line 100: bad substitution: no closing "`" in `bash" in content:
content = re.sub(r'(## Commands\n\`\`\`bash\n).*?(\n\`\`\`)',
f'\\1{new_commands}\\2', content, flags=re.DOTALL)
else:
content = re.sub(r'(## Commands\n).*?(\n\n)',
f'\\1{new_commands}\\2', content, flags=re.DOTALL)
# Update recent changes (keep only last 3)
changes_section = re.search(r'## Recent Changes\n(.*?)(\n\n|$)', content, re.DOTALL)
if changes_section:
changes = changes_section.group(1).strip().split('\n')
changes.insert(0, f"- $CURRENT_BRANCH: Added $NEW_LANG + $NEW_FRAMEWORK")
# Keep only last 3
changes = changes[:3]
content = re.sub(r'(## Recent Changes\n).*?(\n\n|$)',
f'\\1{chr(10).join(changes)}\\2', content, flags=re.DOTALL)
# Update date
content = re.sub(r'Last updated: \d{4}-\d{2}-\d{2}',
f'Last updated: {datetime.now().strftime("%Y-%m-%d")}', content)
# Write to temp file
with open("$temp_file", 'w') as f:
f.write(content)Metadata
Metadata
Assignees
Labels
No labels