Skip to content

fix: properly pass missing env vars in Plugin.Update#1899

Closed
n-rodriguez wants to merge 1 commit intoasdf-vm:masterfrom
n-rodriguez:fix/missing_env_vars
Closed

fix: properly pass missing env vars in Plugin.Update#1899
n-rodriguez wants to merge 1 commit intoasdf-vm:masterfrom
n-rodriguez:fix/missing_env_vars

Conversation

@n-rodriguez
Copy link
Contributor

Summary

Properly pass missing env vars in Plugin.Update

Fixes:

Thank you!


env := map[string]string{
"HOME": os.Getenv("HOME"),
"ASDF_DIR": os.Getenv("ASDF_DIR"),
Copy link
Member

Choose a reason for hiding this comment

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

ASDF_DIR isn't something that is used in asdf 0.16.0+. Are there still plugins relying on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why we shouldn't propagate all env variables of the current process by default here (similar to #1958 )?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ping @Stratus3D thank you!

Copy link
Member

@Stratus3D Stratus3D left a comment

Choose a reason for hiding this comment

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

I think if plugin callbacks need arbitrary environment variables I think we should pass-through any environment variable that is already set. Like we do for shims when executing the real executable.

@n-rodriguez
Copy link
Contributor Author

Closed in favor of #1982

@n-rodriguez n-rodriguez deleted the fix/missing_env_vars branch February 24, 2025 18:30
@Stratus3D
Copy link
Member

Replaced by #1982

@n-rodriguez
Copy link
Contributor Author

@Stratus3D Closed in favor of #1982

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.

3 participants