mirror of
https://github.com/msitarzewski/agency-agents.git
synced 2026-10-01 13:55:54 +03:00
fix(install): honor --path for Windsurf rules
This commit is contained in:
+3
-1
@@ -1014,8 +1014,10 @@ install_aider() {
|
||||
|
||||
install_windsurf() {
|
||||
local src="$INTEGRATIONS/windsurf/.windsurfrules"
|
||||
local dest="${PWD}/.windsurfrules"
|
||||
local dest_dir; dest_dir="$(resolve_dest windsurf "$PWD")"
|
||||
local dest="$dest_dir/.windsurfrules"
|
||||
[[ -f "$src" ]] || { err "integrations/windsurf/.windsurfrules missing. Run convert.sh first."; return 1; }
|
||||
mkdir -p "$dest_dir"
|
||||
if [[ -f "$dest" ]]; then
|
||||
warn "Windsurf: .windsurfrules already exists at $dest (remove to reinstall)."
|
||||
return 0
|
||||
|
||||
@@ -288,6 +288,22 @@ assert_eq "$TOTAL_AGENTS" "$(count_md "$dest")" "installs into a path containing
|
||||
assert_eq 0 "$(find "$home" -maxdepth 1 -name 'My' -o -maxdepth 1 -name 'Agents' | wc -l | tr -d ' ')" \
|
||||
"a spaced path is not split into separate directories"
|
||||
|
||||
# Windsurf's --path is a directory override, just like Aider's. A caller may
|
||||
# run this from another project, so installing into PWD silently edits the
|
||||
# wrong project's .windsurfrules.
|
||||
home="$(sandbox windsurf-path)"
|
||||
work="$home/current project"
|
||||
dest="$home/target project/rules"
|
||||
mkdir -p "$work"
|
||||
(cd "$work" && HOME="$home" bash "$INSTALL" --no-interactive --tool windsurf --path "$dest" > "$home/windsurf.log" 2>&1)
|
||||
assert_eq 0 "$?" "Windsurf --path install exits successfully"
|
||||
[[ -f "$dest/.windsurfrules" ]] \
|
||||
&& pass "Windsurf --path installs into the requested directory" \
|
||||
|| fail "Windsurf --path installs into the requested directory"
|
||||
[[ ! -e "$work/.windsurfrules" ]] \
|
||||
&& pass "Windsurf --path leaves the current project alone" \
|
||||
|| fail "Windsurf --path leaves the current project alone"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 4b. Parallel workers get their arguments intact (PR #755)
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user