From 88d3c0e82826a6e67eac35a6f669e850cd658572 Mon Sep 17 00:00:00 2001 From: pika <67532734+pik4li@users.noreply.github.com> Date: Sat, 11 Jan 2025 19:05:39 +0100 Subject: [PATCH] bugfixed it --- .bashrc | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.bashrc b/.bashrc index 94b4f6f..ee07376 100644 --- a/.bashrc +++ b/.bashrc @@ -102,17 +102,18 @@ _init() { while ! command_exists oh-my-posh; do for binDir in "${binDirs[@]}"; do - case "$binDir" in - "$HOME/.local/bin") - echo_info "Installing oh-my-posh into $binDir" - curl -s https://ohmyposh.dev/install.sh | bash -s -- -d "$binDir" - ;; - *) - echo_info "Installing oh-my-posh into $binDir" - curl -s https://ohmyposh.dev/install.sh | $_sudo bash -s -- -d "$binDir" - ;; - esac - + if [ -d "$binDir" ]; then + case "$binDir" in + "$HOME/.local/bin") + echo_info "Installing oh-my-posh into $binDir" + curl -s https://ohmyposh.dev/install.sh | bash -s -- -d "$binDir" + ;; + *) + echo_info "Installing oh-my-posh into $binDir" + curl -s https://ohmyposh.dev/install.sh | $_sudo bash -s -- -d "$binDir" + ;; + esac + fi done done fi