Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shellcheck warnings #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
10 changes: 6 additions & 4 deletions bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ asdf_yarn_download() {
}

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

(
cd "${ASDF_YARN_DIR}"
Expand Down Expand Up @@ -84,7 +85,8 @@ asdf_yarn_install() {
[ "${ASDF_INSTALL_TYPE}" == 'ref' ] && asdf_yarn_fail "This plugin does not support installing by ref."
[ -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)" -o -x "$(which curl)" ] || asdf_yarn_fail "Missing one of either of the following dependencies: wget, curl"
[ -x "$(which tar)" -a -x "$(which gpg)" ] || asdf_yarn_fail "Missing one or more of the following dependencies: tar, gpg"
[ -x "$(which wget)" ] || [ -x "$(which curl)" ] || asdf_yarn_fail "Missing one of either of the following dependencies: wget, curl"
[ -x "$(which tar)" ] || asdf_yarn_fail "Missing the following dependency: tar"
[ -x "$(which gpg)" ] || asdf_yarn_fail "Missing the following dependency: gpg"

asdf_yarn_install $*
asdf_yarn_install "$*"
2 changes: 1 addition & 1 deletion bin/uninstall
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ asdf_yarn_uninstall() {

[ -z "${ASDF_INSTALL_PATH}" ] && asdf_yarn_fail "No installation directory was provided. Are you running this command via asdf? Try running 'asdf uninstall yarn <version>'"

asdf_yarn_uninstall $*
asdf_yarn_uninstall "$*"