Skip to content

Commit 16e8d34

Browse files
authored
Merge pull request asdf-vm#556 from klundberg/fix-plugin-test-issues
Fix for asdf plugin-test when installed with brew, and a minor logic fix to a warning
2 parents f80b66c + fd3faf8 commit 16e8d34

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/commands/plugin-test.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ plugin_test_command() {
3939
fi
4040

4141
TEST_DIR=$(mktemp -dt asdf.XXXX)
42-
git clone "$ASDF_DIR/.git" "$TEST_DIR"
42+
cp -R "$ASDF_DIR/bin" "$TEST_DIR"
43+
cp -R "$ASDF_DIR/lib" "$TEST_DIR"
44+
cp "$ASDF_DIR/asdf.sh" "$TEST_DIR"
4345

4446
plugin_test() {
4547
export ASDF_DIR=$TEST_DIR
@@ -72,8 +74,8 @@ plugin_test_command() {
7274
fail_test "$plugin_name/bin/list-all does not set GitHub Authorization token"
7375
fi
7476

75-
# test for most common token names we have on plugins
76-
if [ -z "$OAUTH_TOKEN" ] || [ -z "$GITHUB_API_TOKEN" ] ; then
77+
# test for most common token names we have on plugins. If both are empty show this warning
78+
if [ -z "$OAUTH_TOKEN" ] && [ -z "$GITHUB_API_TOKEN" ] ; then
7779
echo "$plugin_name/bin/list-all is using GitHub API, just be sure you provide an API Authorization token"
7880
echo "via your travis settings. This is the current rate_limit:"
7981
echo

0 commit comments

Comments
 (0)