Hacker Newsnew | past | comments | ask | show | jobs | submit | aablkn's commentslogin

Oh don't forget the good old

    // +build !linux
build constraints feature. It's been there since go 1.0 afaik.


You might want to `set -o pipefail` on your bash because a failing process does not stop things from getting piped:

`echo OK | false | echo OK2` --> this command returns zero exit code even though false does return non-zero exit code. If you do `set -o pipefail` entire pipe will fail with non-zero exit code (of `false`).


great point. if you have a good idea of how hashpipe should do it better pls comment at: https://github.com/jbenet/hashpipe/issues

at least hashpipe stops the output, so this would not run the bad code. hashpipe would stop it:

  cat evil | hashpipe <some-other-hash> | sh
without pipefail, it would still exit 0, but at least the evil would be contained.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: