-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdoctor_post_install_unix
More file actions
executable file
·57 lines (42 loc) · 1.78 KB
/
doctor_post_install_unix
File metadata and controls
executable file
·57 lines (42 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env bash
set -euo pipefail
echo "==> Running strict environment doctor"
output=""
set +e
output=$(./verify_post_install_unix --strict 2>&1)
exit_code=$?
set -e
printf '%s\n' "$output"
if [[ "$exit_code" -eq 0 ]]; then
echo
echo "✅ Doctor passed. Your setup looks healthy."
exit 0
fi
echo
echo "==> Suggested fixes"
if grep -q "Ghostty config validation failed" <<<"$output"; then
echo "- Ghostty config: run /Applications/Ghostty.app/Contents/MacOS/ghostty +validate-config --config-file ~/.config/ghostty/config"
fi
if grep -q "^FAIL: command '" <<<"$output"; then
echo "- Missing commands: rerun installer (make install-mac or make install-unix) and check PATH in ~/.zshrc"
fi
if grep -q "^FAIL: file '" <<<"$output"; then
echo "- Missing config files: rerun installer to copy templates, then rerun make doctor"
fi
if grep -q "^FAIL: zsh config syntax" <<<"$output"; then
echo "- Zsh syntax: run zsh -n ~/.zshrc and fix the reported line"
fi
if grep -q "^FAIL: tmux config parse" <<<"$output"; then
echo "- tmux parse: run tmux -L doctor -f ~/.tmux.conf new-session -d -s smoke to reproduce"
fi
if grep -q "^FAIL: tmux plugin directory '" <<<"$output"; then
echo "- tmux plugins missing: run ~/.tmux/plugins/tpm/bin/install_plugins then reload tmux config"
fi
if grep -q "^FAIL: numfmt for tmux network throughput formatting missing" <<<"$output"; then
echo "- numfmt missing for tmux NET status: install coreutils (macOS: brew install coreutils, Linux: sudo apt install -y coreutils)"
fi
if grep -q "^FAIL: nvim init.lua syntax" <<<"$output" || grep -q "^FAIL: neovim headless start" <<<"$output"; then
echo "- Neovim config: run nvim --headless +qa and inspect plugin/config errors"
fi
echo "- For broader context, see README troubleshooting section."
exit "$exit_code"