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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect output to avoid arch variable contamination #8760

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

Conversation

jrahme-cci
Copy link
Contributor

Description

For the runner manual install some versions of grep caused extra output to enter the arch variable. This PR redirects the /usr/bin/arch stderr and stdout to avoid contaminating the variable with extra output.

Reasons

Issue was raised in an on-prem support workflow https://circleci.slack.com/archives/C05LH7BMR2A/p1713553512725209

Content Checklist

Please follow our style when contributing to CircleCI docs. Our style guide is here: https://circleci.com/docs/style/style-guide-overview.

Please take a moment to check through the following items when submitting your PR (this is just a guide so will not be relevant for all PRs) 馃樃:

  • Break up walls of text by adding paragraph breaks.
  • Consider if the content could benefit from more structure, such as lists or tables, to make it easier to consume.
  • Keep the title between 20 and 70 characters.
  • Consider whether the content would benefit from more subsections (h2-h6 headings) to make it easier to consume.
  • Check all headings h1-h6 are in sentence case (only first letter is capitalized).
  • Is there a "Next steps" section at the end of the page giving the reader a clear path to what to read next?
  • Include relevant backlinks to other CircleCI docs/pages.

@jrahme-cci jrahme-cci requested review from a team as code owners May 9, 2024 11:27
@rosieyohannan rosieyohannan requested a review from a team May 9, 2024 13:04
@@ -65,7 +65,7 @@ NOTE: The current CircleCI machine runner binary can always be found by using `c
[,shell]
----
export RUNNERVERSION='current'
export CPUARCH=$(/usr/bin/arch | grep 'x86_64' && echo 'amd64' || echo 'arm64')
export CPUARCH=$(/usr/bin/arch | grep 'x86_64' >/dev/null 2>/dev/null && echo 'amd64' || echo 'arm64')
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export CPUARCH=$(/usr/bin/arch | grep 'x86_64' >/dev/null 2>/dev/null && echo 'amd64' || echo 'arm64')
export CPUARCH=$(/usr/bin/arch | grep 'x86_64' >/dev/null 2>&1 && echo 'amd64' || echo 'arm64')

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.

None yet

4 participants