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: bug where non-nil, empty dynamic variables are returned as an empty interface #1904

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

pd93
Copy link
Member

@pd93 pd93 commented Nov 4, 2024

Fixes #1903

This PR changes the Sh property of a Var to a pointer so that we are able to distinguish between a value that is not set (nil) and a value that is empty (&""). We then use this to return early if we detect an empty dynamic variable. This will always resolve to another empty string.

This fixes cases where a dynamic variable contains a template that resolves to an empty string.

@pd93 pd93 merged commit 148b090 into main Nov 4, 2024
14 checks passed
@pd93 pd93 deleted the 1903-fix-empty-sh-command branch November 4, 2024 13:30
pd93 added a commit that referenced this pull request Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants