Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .go/core/dep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ dep() {
get_dep "$name" "$url" "$tar_path"
fi
else
fail "unable to install ${name} v${v_ref}"
warn "\"$name $varg\" does not produce a version number, attempting install anyway."
warn "installing ${name} v${v_ref}..."
get_dep "$name" "$url" "$tar_path"
fi
}

Expand Down Expand Up @@ -147,15 +149,15 @@ get_dep() {
}

# version invites a tool's '--version' subcommand to return a string's stdout and stderr output to look
# for a semantic vesrion
# for a semantic version
version() {
local name="$1"
local varg="$2"
local eval_version
# pull a valid semver value from the output, this should include
# multiline --version calls such as "gh --version"
if ! eval_version=$($name "$varg" 2>&1 | grep -Eo "([0-9]+\.){1,}[0-9]*(-\w+)?" | head -1); then
fail "\"$name $varg\" does not produce a version number!"
return
fi
echo "$eval_version"
}
Expand Down