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

fix: simplify env vars parsing #1988

Merged
merged 2 commits into from
Feb 26, 2025
Merged

Conversation

andrecloutier
Copy link
Contributor

Summary

Simplifies the parsing of env vars reported by bash by parsing NULL delimited values rather than new lines.

Fixes: #1986

Other Information

@andrecloutier andrecloutier requested a review from a team as a code owner February 25, 2025 23:54
@andrecloutier andrecloutier changed the title fix: improve env vars parsing fix: simplify env vars parsing Feb 26, 2025
env, err := Generate(plugin, map[string]string{"EQUALSTEST": "abc\n123"})
assert.Nil(t, err)
assert.Equal(t, value, env["BAZ"])
assert.Equal(t, "abc\n123", env["EQUALSTEST"])
Copy link
Member

Choose a reason for hiding this comment

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

I think the EQUALSTEST code could be removed from this test as it's not really relevant and already converted by another t.Run.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 Removed!

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.

Thanks for the PR @andrecloutier ! I left one comment, otherwise looks good to me.

@Stratus3D Stratus3D merged commit 8990b6b into asdf-vm:master Feb 26, 2025
8 checks passed
@Stratus3D Stratus3D mentioned this pull request Feb 25, 2025
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.

bug: Multiline string ENV var handling issue in shim logic (asdf v0.16.4)
2 participants