Skip to content

Commit

Permalink
fix: fix failure (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
wintermi authored Feb 15, 2023
1 parent 00c6e30 commit 5ecf87a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zap.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function plug() {
local plugin_absolute="${1:A}"
if [ -d "${plugin_absolute}" ]; then
local plugin="${plugin_absolute}"
local plugin_name="${plugin:t}"
local plugin_dir="${plugin_absolute}"
else
# If the basename directory exists, then local source only
Expand All @@ -29,11 +30,11 @@ function plug() {
fi

local plugin="$1"
local plugin_name="${plugin:t}"
local plugin_dir="$ZAP_PLUGIN_DIR/$plugin_name"
fi

local git_ref="$2"
local plugin_name="${plugin:t}"
if [ ! -d "$plugin_dir" ]; then
echo "🔌 Zap is installing $plugin_name..."
git clone "https://github.com/${plugin}.git" "$plugin_dir" > /dev/null 2>&1 || { echo -e "\e[1A\e[K❌ Failed to clone $plugin_name"; return 12 }
Expand Down

0 comments on commit 5ecf87a

Please sign in to comment.