Repository navigation
Conversation
asdf plugin test accepted [test_command...] but never ran it since the Go rewrite: only the install was checked, so plugins passed with a test command that fails. asdf-vm/actions plugin-test passes the command too and was affected the same way. The command runs after the install with the version's bin paths on PATH and exec-env applied, as asdf env does; a failure fails the test. A single argument is run as a command line, the way asdf-vm/actions passes it.
3 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
asdf plugin test <name> <url> [test_command...]has not run the test command since the Go rewrite:pluginTestCommandreads onlyargs[0]andargs[1], and the remaining arguments are silently ignored. A plugin passes the test even withfalseas the test command, as long as the install succeeds.asdf-vm/actionsplugin-testpasses its requiredcommandinput the same way, so plugin CI relying on it never runs the command either. asdf 0.15 ran it afterasdf localandreshim.This change runs the command after the install:
PATHand the plugin'sexec-envapplied, the wayasdf envbuilds the environment;FAILED: <command> failed: <error>;node --version, as in the docs), a single argument is run as a command line ("node --version", asasdf-vm/actionspasses it).Tests: four cases in
test/plugin_test_command.bats(arguments, single command line, failing command, missing command); they fail without the change. The plugin docs get a short description of how the command runs.Fixes: no issue found for this.
Other Information
Found while testing plugins in asdf-community (asdf-tomcat, asdf-jetbrains): their CI passed with
plugin-testwhile the command was never executed.