Filter only executable files in local tools copying
Ensure that only executable files are copied from LOCAL_TOOLS_DIR to avoid copying non-executable or invalid files. Added check for executable permission (-x) alongside file existence (-f).
This commit is contained in:
@@ -53,7 +53,7 @@ fi
|
||||
LOCAL_TOOLS_DIR="$CLAUDE_DIR/tools-local"
|
||||
if [[ -d "$LOCAL_TOOLS_DIR" ]]; then
|
||||
for src in "$LOCAL_TOOLS_DIR"/*; do
|
||||
[[ -f "$src" ]] || continue
|
||||
[[ -f "$src" && -x "$src" ]] || continue
|
||||
name="$(basename "$src")"
|
||||
cp "$src" "$CLAUDE_DIR/llm-functions/bin/$name"
|
||||
chmod +x "$CLAUDE_DIR/llm-functions/bin/$name"
|
||||
|
||||
Reference in New Issue
Block a user