add submodules initialization to health-check
This commit is contained in:
parent
7221bf8bea
commit
7735ef927b
|
@ -149,6 +149,15 @@ function perform_health_check() {
|
|||
healthy=0
|
||||
fi
|
||||
|
||||
if [[ $(is_dir_empty "$CURRENT_DIR/../vendor/tmux-printer") == "1" ]]; then
|
||||
log_message " * Submodules not initialized properly. Please run:"
|
||||
log_message ""
|
||||
log_message " cd $TMUX_FINGERS_ROOT"
|
||||
log_message " git submodule update --init --recursive"
|
||||
log_message " tmux source ~/.tmux.conf"
|
||||
healthy=0
|
||||
fi
|
||||
|
||||
if [[ $healthy -eq 0 ]]; then
|
||||
while [[ $(is_tmux_ready) = 0 ]]; do
|
||||
: # waiting for-tmux
|
||||
|
|
|
@ -117,3 +117,23 @@ function tmux_list_vi_copy_keys() {
|
|||
|
||||
echo "$output"
|
||||
}
|
||||
|
||||
function is_dir_empty() {
|
||||
local dir_path="$1"
|
||||
|
||||
if [[ $(ls -1 "$dir_path" | wc -l) -gt 0 ]]; then
|
||||
echo 0
|
||||
else
|
||||
echo 1
|
||||
fi
|
||||
}
|
||||
|
||||
function resolve_path() {
|
||||
local path=$1
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
echo "$(stat -f "%N" "$path")"
|
||||
else
|
||||
echo "$(readlink -f "$path")"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue