Skip to content

bug: Failing test "asdf execute plugin default command unsets ASDF_INSTALL_TYPE ASDF_INSTALL_VERSION and ASDF_INSTALL_PATH env variables" #2005

@farkasmate

Description

@farkasmate

Describe the Bug

v0.16.5 is failing test https://github.com/asdf-vm/asdf/blob/v0.16.5/test/plugin_extension_command.bats#L120

Steps to Reproduce

Run make test

Expected Behaviour

Tests are passing

Actual Behaviour

    --- FAIL: TestBatsTests/plugin_extension_command (1.03s)
        main_test.go:51: stdout: 1..6
            ok 1 asdf help shows plugin extension commands
            ok 2 asdf help shows extension commands for plugin with hyphens in the name
            ok 3 asdf can execute plugin bin commands
            ok 4 asdf can execute plugin default command without arguments
            ok 5 asdf can execute plugin default command with arguments
            not ok 6 asdf execute plugin default command unsets ASDF_INSTALL_TYPE ASDF_INSTALL_VERSION and ASDF_INSTALL_PATH env variables
            # (in test file /aports/testing/asdf/temp/asdf/test/plugin_extension_command.bats, line 136)
            #   `[ "0" -eq "$(echo "$output" | grep -c "ASDF_INSTALL_")" ]' failed
            # BATS_RUN_LOGS_DIRECTORY=
            # BATS_TEST_TMPDIR=/tmp/bats-run-cCpFjj/test/6
            # BATS_LIBDIR=lib
            # BATS_SUITE_TMPDIR=/tmp/bats-run-cCpFjj/suite
            # BATS_ROOT_PID=7980
            # BATS_WARNING_FILE=/tmp/bats-run-cCpFjj/warnings.log
            # BATS_FILE_TMPDIR=/tmp/bats-run-cCpFjj/file/0
            # BATS_END_CODE_QUOTE='
            # BASE_DIR=/tmp/TestBatsTests2190902013/001/w spacetest_asdf_execute_plugin_default_command_unsets_ASDF-2d5fINSTALL-2d5fTYPE_ASDF-2d5fINSTALL-2d5fVERSION_and_ASDF-2d5fINSTALL-2d5fPATH_env_variables
            # BATS_TEST_SOURCE=/aports/testing/asdf/temp/asdf/test/plugin_extension_command.bats
            # GIT_CONFIG_GLOBAL=/dev/null
            # BATS_TEST_NAME=test_asdf_execute_plugin_default_command_unsets_ASDF-2d5fINSTALL-2d5fTYPE_ASDF-2d5fINSTALL-2d5fVERSION_and_ASDF-2d5fINSTALL-2d5fPATH_env_variables
            # PWD=/aports/testing/asdf/temp/asdf/cmd/asdf
            # _=/usr/bin/env
            # BATS_TMPDIR=/tmp
            # BATS_TEST_DESCRIPTION=asdf execute plugin default command unsets ASDF_INSTALL_TYPE ASDF_INSTALL_VERSION and ASDF_INSTALL_PATH env variables
            # HOME=/tmp/TestBatsTests2190902013/001/w spacetest_asdf_execute_plugin_default_command_unsets_ASDF-2d5fINSTALL-2d5fTYPE_ASDF-2d5fINSTALL-2d5fVERSION_and_ASDF-2d5fINSTALL-2d5fPATH_env_variables
            # BATS_TEST_FILENAME=/aports/testing/asdf/temp/asdf/test/plugin_extension_command.bats
            # BATS_RUN_TMPDIR=/tmp/bats-run-cCpFjj
            # BATS_VERSION=1.11.1
            # ASDF_DATA_DIR=/tmp/TestBatsTests2190902013/001/w spacetest_asdf_execute_plugin_default_command_unsets_ASDF-2d5fINSTALL-2d5fTYPE_ASDF-2d5fINSTALL-2d5fVERSION_and_ASDF-2d5fINSTALL-2d5fPATH_env_variables/.asdf
            # BATS_GUARANTEED_MINIMUM_VERSION=1.7.0
            # BATS_CWD=/aports/testing/asdf/temp/asdf/cmd/asdf
            # BATS_LINE_REFERENCE_FORMAT=comma_line
            # BATS_BEGIN_CODE_QUOTE=`
            # BATS_TEMPDIR_CLEANUP=1
            # SHLVL=4
            # BATS_TEST_RETRIES=0
            # BATS_RUNLOG_FILE=/dev/null
            # BATS_TEST_NUMBER=6
            # BATS_SETUP_SUITE_COMPLETED=1
            # PATH=/tmp/TestBatsTests2190902013/001:/tmp/TestBatsTests2190902013/001/w spacetest_asdf_execute_plugin_default_command_unsets_ASDF-2d5fINSTALL-2d5fTYPE_ASDF-2d5fINSTALL-2d5fVERSION_and_ASDF-2d5fINSTALL-2d5fPATH_env_variables/.asdf/shims:/usr/libexec/bats-core:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
            # BATS_LIB_PATH=/usr/lib/bats
            # BATS_LIBEXEC=/usr/libexec/bats-core
            # BATS_SUITE_TEST_NUMBER=6
            # BATS_ROOT=/usr
            # ASDF_BIN=/tmp/TestBatsTests2190902013/001
            # BATS_SAVED_PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
            # BASH_FUNC_bats_readlinkf%%=() {  readlink -f "$1"
            # }

        main_test.go:51: stderr:
        main_test.go:51: bats command failed to run test file successfully

Environment

OS:
Linux 06b89fb379a6 6.12.15-orbstack-00304-gd0ddcf70447d #18 SMP Tue Feb 18 19:55:47 UTC 2025 x86_64 Linux

SHELL:
GNU bash, version 5.2.37(1)-release (x86_64-alpine-linux-musl)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

BASH VERSION:
5.2.37(1)-release

ASDF VERSION:
0.16.5

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/home/nobody/.asdf
ASDF_CONFIG_FILE=/home/nobody/.asdfrc

ASDF INSTALLED PLUGINS:

asdf plugins affected (if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions