-
Notifications
You must be signed in to change notification settings - Fork 77
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 deepsource: DOK-SC2002, DOK-W1001 Useless cat and Multiple consecutive RUN #1847
Conversation
Signed-off-by: hlts2 <[email protected]>
[CHATOPS:HELP] ChatOps commands.
|
Signed-off-by: hlts2 <[email protected]>
Deploying with Cloudflare Pages
|
Signed-off-by: hlts2 <[email protected]>
Co-authored-by: Kiichiro YUKAWA <[email protected]>
@@ -67,7 +67,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] | |||
RUN GO_VERSION="$(< GO_VERSION)" \ | |||
&& VALD_VERSION="$(< VALD_VERSION)" \ | |||
&& GIT_COMMIT="$(git rev-list -1 HEAD)" \ | |||
&& CPU_INFO_FLAGS="$(cat /proc/cpuinfo | grep flags | cut -d " " -f 2- | head -1)" \ | |||
&& CPU_INFO_FLAGS="$(< /proc/cpuinfo | grep flags | cut -d " " -f 2- | head -1 || true)" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need || true
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it because with set -o pipefail, if you run a head or grep command on the right side of the pipe, the pipe will be closed and a write to the closed pipe will occur, resulting in a SIGPIPE.
Description:
As titled
Related Issue:
Versions:
Checklist:
Special notes for your reviewer: