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

feat(golang-rewrite): misc. plugin improvements #94

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

Stratus3D
Copy link
Member

@Stratus3D Stratus3D commented Dec 14, 2024

  • Correct the environment bin/install runs in
  • Improve output of asdf list all command when plugin not found
  • Update asdf plugin test command to install a tool version in the test

err = versions.InstallOneVersion(conf, plugin, toolVersion, false, os.Stdout, os.Stderr)
if err != nil {
failTest(l, "install exited with an error")
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugin test command needs to install a tool version to verify the plugin is behaving correctly.

if err != nil {
os.Exit(1)
return err
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List all command should print an error and exit if plugin is not installed.

@@ -153,6 +154,8 @@ func InstallOneVersion(conf config.Config, plugin plugins.Plugin, versionStr str
"ASDF_CONCURRENCY": asdfConcurrency(conf),
}

env = execenv.MergeEnv(execenv.SliceToMap(os.Environ()), env)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Install callback needs to run in an environment that has the above variables set, along with env vars that were set at the time asdf was invoked.

* Correct the environment `bin/install` runs in
* Improve output of `asdf list all` command when plugin not found
* Update `asdf plugin test` command to install a tool version in the test
@Stratus3D Stratus3D marked this pull request as ready for review December 14, 2024 20:11
@Stratus3D Stratus3D force-pushed the tb/plugin-improvements branch from 3c4d1c9 to 408f8b3 Compare December 14, 2024 20:12
@Stratus3D Stratus3D merged commit 5349a06 into master Dec 14, 2024
7 checks passed
@Stratus3D Stratus3D deleted the tb/plugin-improvements branch December 14, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant