Skip to content

Commit 2df3464

Browse files
committed
fix: reorder reinstall script steps to prevent config setup being skipped
The 'openclaw plugins install' command on line 57 blocks, causing steps 5-7 (auth profile, allow list, apiKey setup) to never execute. This left users with incomplete configuration. Fix: Move config setup (steps 4-6) before the install (step 7), so the plugin starts with correct configuration already in place. Resolves issue where plugins.allow was empty and apiKey was missing.
1 parent 3cf17cf commit 2df3464

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scripts/reinstall.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ lsof -ti :8402 | xargs kill -9 2>/dev/null || true
5252
echo "→ Cleaning models cache..."
5353
rm -f ~/.openclaw/agents/main/agent/models.json 2>/dev/null || true
5454

55-
# 4. Reinstall
56-
echo "→ Installing ClawRouter..."
57-
openclaw plugins install @blockrun/clawrouter
58-
59-
# 5. Inject auth profile (ensures blockrun provider is recognized)
55+
# 4. Inject auth profile (ensures blockrun provider is recognized)
6056
echo "→ Injecting auth profile..."
6157
node -e "
6258
const os = require('os');
@@ -100,7 +96,7 @@ if (!store.profiles[profileKey]) {
10096
}
10197
"
10298

103-
# 6. Add plugin to allow list (required for OpenClaw to load it)
99+
# 5. Add plugin to allow list (required for OpenClaw to load it)
104100
echo "→ Adding to plugins allow list..."
105101
node -e "
106102
const os = require('os');
@@ -133,7 +129,7 @@ if (fs.existsSync(configPath)) {
133129
}
134130
"
135131

136-
# 7. Ensure apiKey is present for /model picker (but DON'T override default model)
132+
# 6. Ensure apiKey is present for /model picker (but DON'T override default model)
137133
echo "→ Finalizing setup..."
138134
node -e "
139135
const os = require('os');
@@ -164,6 +160,10 @@ if (fs.existsSync(configPath)) {
164160
}
165161
"
166162

163+
# 7. Install plugin (done last so it starts with correct config)
164+
echo "→ Installing ClawRouter..."
165+
openclaw plugins install @blockrun/clawrouter
166+
167167
echo ""
168168
echo "✓ Done! Smart routing enabled by default."
169169
echo ""

0 commit comments

Comments
 (0)