Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Don't freeze up when no args are passed in #303

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

spencer-lunarg
Copy link
Contributor

someone pointed out if you go ./spirv-reflect it just hangs, this just has this print the help

@@ -90,7 +90,7 @@ int main(int argn, char** argv) {
arg_parser.AddFlag("f", "file", "");
arg_parser.AddFlag("fcb", "flatten_cbuffers", "");
arg_parser.AddFlag("ci", "ci", ""); // Not advertised
if (!arg_parser.Parse(argn, argv, std::cerr)) {
if (!arg_parser.Parse(argn, argv, std::cerr) || arg_parser.GetArgs().empty()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just realized this doesn't account for stdin actually

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant