Skip to content

"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/

Python

Apply suggestions from code review

panxiaojun23374668461d759
diff --git a/README.md b/README.md
index e0e8d2448..e6fffd0a4 100644
--- a/README.md
+++ b/README.md
@@ -236,7 +236,6 @@ Use CLI-Anything to validate ./libreoffice
The Codex skill adapts the same methodology used by the Claude Code plugin and
OpenCode commands, while keeping the generated Python harness format unchanged.
-
</details>
<details>
diff --git a/qoder-plugin/setup-qodercli.sh b/qoder-plugin/setup-qodercli.sh
index 50b9de1c1..ff2012ac7 100755
--- a/qoder-plugin/setup-qodercli.sh
+++ b/qoder-plugin/setup-qodercli.sh
@@ -15,12 +15,20 @@ NC='\033[0m'
# Determine plugin path
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-# Default to cli-anything-plugin relative to qoder-plugin directory
-PLUGIN_DIR="${1:-$(cd "${SCRIPT_DIR}/../cli-anything-plugin" && pwd)}"
+# Determine plugin directory: normalize to absolute path
+if [ $# -ge 1 ]; then
+ if ! PLUGIN_DIR="$(cd "$1" && pwd)"; then
+ echo -e "${YELLOW}Error: Invalid plugin directory: $1${NC}" >&2
+ exit 1
+ fi
+else
+ # Default to cli-anything-plugin relative to qoder-plugin directory
+ PLUGIN_DIR="$(cd "${SCRIPT_DIR}/../cli-anything-plugin" && pwd)"
+fi
# Validate plugin directory
if [ ! -f "${PLUGIN_DIR}/.claude-plugin/plugin.json" ]; then
- echo -e "${YELLOW}Error: plugin.json not found at ${PLUGIN_DIR}/.claude-plugin/${NC}"
+ echo -e "${YELLOW}Error: plugin.json not found at ${PLUGIN_DIR}/.claude-plugin/plugin.json${NC}"
exit 1
fi