Skip to content

Commit

Permalink
Dont require gpg for yarn v2+ (mise-plugins#5)
Browse files Browse the repository at this point in the history
* gpg and tar should be required only for yarn v1 install

* fix copy paste error made previously

- it caused gpg verification to always fail
- ref: 872c297#diff-f9746898bdf5ee311b5c55bc0b6d8c64901f52940c591089b3bfbda5f5b26c8aL55
  • Loading branch information
kroleg authored Apr 10, 2024
1 parent 6e5a71f commit a769081
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ asdf_yarn_v1_download() {
}

asdf_yarn_v1_install() {
{ [ -x "$(which tar)" ] && [ -x "$(which gpg)" ]; } || asdf_yarn_fail "Missing one or more of the following dependencies: tar, gpg"

local ASDF_YARN_DIR
ASDF_DATA_DIR="$(mktemp -d -t asdf-yarn-XXXXXXX)"
ASDF_YARN_DIR="$(mktemp -d -t asdf-yarn-XXXXXXX)"

(
cd "${ASDF_YARN_DIR}"
Expand Down Expand Up @@ -126,6 +128,5 @@ asdf_yarn_install() {
[ -z "${ASDF_INSTALL_VERSION}" ] && asdf_yarn_fail "Unspecified install version."
[ -z "${ASDF_INSTALL_PATH}" ] && asdf_yarn_fail "No installation directory was provided. Are you running this command via asdf? Try running 'asdf install yarn <version>'"
[ -x "$(which wget)" ] || [ -x "$(which curl)" ] || asdf_yarn_fail "Missing one of either of the following dependencies: wget, curl"
{ [ -x "$(which tar)" ] && [ -x "$(which gpg)" ]; } || asdf_yarn_fail "Missing one or more of the following dependencies: tar, gpg"

asdf_yarn_install "$@"

0 comments on commit a769081

Please sign in to comment.