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

format-check.sh uses non-existent command "NOT" #140

Closed
ilyash opened this issue Dec 31, 2021 · 2 comments
Closed

format-check.sh uses non-existent command "NOT" #140

ilyash opened this issue Dec 31, 2021 · 2 comments

Comments

@ilyash
Copy link

ilyash commented Dec 31, 2021

if NOT type $CLANG_FORMAT > /dev/null 2>&1; then

consequently, the body of if is never invoked.

@paxsali
Copy link

paxsali commented Dec 31, 2021

I assume without knowing exactly that the author of that commit has NOT as an alias to ! in his .bashrc.
Apparently they tested it locally on their machine (where it worked) and then commited the NOT in the remote repo.

alias NOT='!'

if NOT false; then
    echo "the if condition is true."
fi

This is the only explanation I can see plausible. Of course the NOT must be removed and replaced with a proper !.

@ilyash
Copy link
Author

ilyash commented Dec 31, 2021

I assume without knowing exactly that the author of that commit has NOT as an alias to ! in his .bashrc.

Hmm. I thought aliases only supposed to work for interactive shells, not scripts...

replaced with a proper !.

Most likely

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

No branches or pull requests

3 participants