diff --git a/default/.config/zsh/functions.zsh b/default/.config/zsh/functions.zsh index 747a1ea..48d1f13 100644 --- a/default/.config/zsh/functions.zsh +++ b/default/.config/zsh/functions.zsh @@ -18,15 +18,14 @@ dotstate_update() { [[ "$(id -u)" -ne "$(stat -c '%u' "$TARGET_DIR" 2>/dev/null)" ]] && return 0 [[ ! -d "$TARGET_DIR/.git" ]] && return 0 - local orig_dir="$PWD" cd "$TARGET_DIR" || return 0 local remote_sha local_sha remote_sha=$(timeout 5 git ls-remote "$REPO_URL" HEAD | awk '{print $1}') - [[ -z "$remote_sha" ]] && { cd "$orig_dir"; return 0; } + [[ -z "$remote_sha" ]] && { cd ~; return 0; } local_sha=$(git rev-parse HEAD) if [[ "$remote_sha" == "$local_sha" ]]; then - cd "$orig_dir" + cd ~ return 0 fi