Fix convert.sh writing all single-file outputs regardless of --tool flag
Running `convert.sh --tool aider` previously also wrote the Windsurf output (and vice versa) because write_single_file_outputs dumped all formats unconditionally. Each single-file format now only writes when its tool is selected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -456,16 +456,6 @@ run_conversions() {
|
|||||||
echo "$count"
|
echo "$count"
|
||||||
}
|
}
|
||||||
|
|
||||||
write_single_file_outputs() {
|
|
||||||
# Aider
|
|
||||||
mkdir -p "$OUT_DIR/aider"
|
|
||||||
cp "$AIDER_TMP" "$OUT_DIR/aider/CONVENTIONS.md"
|
|
||||||
|
|
||||||
# Windsurf
|
|
||||||
mkdir -p "$OUT_DIR/windsurf"
|
|
||||||
cp "$WINDSURF_TMP" "$OUT_DIR/windsurf/.windsurfrules"
|
|
||||||
}
|
|
||||||
|
|
||||||
# --- Entry point ---
|
# --- Entry point ---
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
@@ -524,9 +514,14 @@ HEREDOC
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Write single-file outputs after accumulation
|
# Write single-file outputs after accumulation
|
||||||
if [[ "$tool" == "all" || "$tool" == "aider" || "$tool" == "windsurf" ]]; then
|
if [[ "$tool" == "all" || "$tool" == "aider" ]]; then
|
||||||
write_single_file_outputs
|
mkdir -p "$OUT_DIR/aider"
|
||||||
|
cp "$AIDER_TMP" "$OUT_DIR/aider/CONVENTIONS.md"
|
||||||
info "Wrote integrations/aider/CONVENTIONS.md"
|
info "Wrote integrations/aider/CONVENTIONS.md"
|
||||||
|
fi
|
||||||
|
if [[ "$tool" == "all" || "$tool" == "windsurf" ]]; then
|
||||||
|
mkdir -p "$OUT_DIR/windsurf"
|
||||||
|
cp "$WINDSURF_TMP" "$OUT_DIR/windsurf/.windsurfrules"
|
||||||
info "Wrote integrations/windsurf/.windsurfrules"
|
info "Wrote integrations/windsurf/.windsurfrules"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user