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 runtime panic in arg parser #542

Merged
merged 3 commits into from
Mar 14, 2022

Conversation

Integralist
Copy link
Collaborator

@Integralist Integralist commented Mar 14, 2022

Fixes #540

This was caused by a nil pointer dereference.

The solution is to pass a non-pointer type to the arg parser. We are then able to (after the CLI arg parser has run) inspect whether the value was provided, and if so, set the corresponding Go-Fastly struct field.

NOTE: I've checked all other Go-Fastly CREATE input types and there doesn't appear to be any other instances that need to be corrected within the CLI.

@Integralist Integralist added the bug Something isn't working label Mar 14, 2022
@Integralist Integralist requested review from a team, kailan, doramatadora, triblondon and fgsch and removed request for a team March 14, 2022 12:25
Copy link
Contributor

@doramatadora doramatadora left a comment

Choose a reason for hiding this comment

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

LGTM!

@Integralist Integralist merged commit 3ed662a into main Mar 14, 2022
@Integralist Integralist deleted the integralist/arg-parser-runtime-panic branch March 14, 2022 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SIGSEGV on fastly backend create (v1.7.0)
2 participants