Skip to content

Fix non-elf file skip #6

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

Closed
wants to merge 1 commit into from
Closed

Conversation

Stivius
Copy link
Contributor

@Stivius Stivius commented Jan 6, 2021

After I did more research on #5 it turned out that the check was wrong.
As it was stated in the issue #5, $(...) should return 0 in case of ELF file and 1 otherwise. However, turning a boolean $(...) into a string "$(...)" breaks this condition.

@TheAssassin
Copy link
Member

I think what you do there is wrong, too. I'm sure shellcheck would complain about the possible escaping issues.

The code tries to find out whether the command worked, and runs the part after the && only then. No need to interpret stdout at all (in fact, there won't be any, anyway, due to --silent/-q). You can just dump the $ and use a normal subshell (...) && .... (In fact, the subshell wouldn't be needed, but it's definitely cleaner).

@TheAssassin
Copy link
Member

Replaced by #13.

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