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

Enable replace value to be an empty string #53

Merged
merged 1 commit into from
Mar 8, 2023

Conversation

t2oh4e
Copy link
Contributor

@t2oh4e t2oh4e commented Mar 1, 2023

Currently it's not possible to replace the values with an empty string since it triggers this error. I think it should be possible to use an empty string as the replace value.

Copy link
Owner

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

Copy link
Owner

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

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

Hrm looks like CI isn't happy. Could you fix up the issues?

@@ -121,10 +121,6 @@ func main() {
panic(errors.New("gha-find-replace: expected with.find to be a string"))
}

if replaceErr != nil {
panic(errors.New("gha-find-replace: expected with.replace to be a string"))
Copy link
Owner

Choose a reason for hiding this comment

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

I think we shouldn't be deleting this check and instead assign replace = "" instead of panicing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, works for me :) changed.

Copy link
Owner

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

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

Many thanks!

@jacobtomlinson jacobtomlinson merged commit a51bbcd into jacobtomlinson:master Mar 8, 2023
@t2oh4e t2oh4e deleted the patch-1 branch March 8, 2023 11:59
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.

2 participants