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

Silence stderr output on *BSD #965

Merged
merged 1 commit into from
Feb 22, 2022
Merged

Silence stderr output on *BSD #965

merged 1 commit into from
Feb 22, 2022

Conversation

frenkel
Copy link
Contributor

@frenkel frenkel commented Feb 17, 2022

Without this, all my cronjobs, servers etc will always output to stderr:

hostname: unknown option -- f
usage: hostname [-s] [name-of-host]

Without this, all my cronjobs, servers etc will always output to stderr:
```
hostname: unknown option -- f
usage: hostname [-s] [name-of-host]
```
@CLAassistant
Copy link

CLAassistant commented Feb 17, 2022

CLA assistant check
All committers have signed the CLA.

@angelatan2 angelatan2 added the community To tag external issues and PRs submitted by the community label Feb 17, 2022
@kaylareopelle
Copy link
Contributor

Thanks for your submission, @frenkel! Our team is discussing your contribution internally and will be back in touch with more details soon.

@kaylareopelle
Copy link
Contributor

@angelatan2, @fallwith - Let's take a look at the failed .github/workflows/label_community_cards.yml build tomorrow

@kaylareopelle
Copy link
Contributor

Hi @frenkel! We've decided to add this to our codebase. Before we merge it in, could you let us know what specific BSD you encountered this issue on?

@frenkel
Copy link
Contributor Author

frenkel commented Feb 19, 2022

Hi @kaylareopelle, great to hear! I’ve seen this on OpenBSD and it fixes the issue there. Thanks!

@fallwith
Copy link
Contributor

Thank you, @frenkel - OpenBSD's hostname definitely doesn't support the -f switch. Merging.

For posterity for future reviewers who come across this PR:

  • We probably should standardize on the use of a CLI helper that automatically handles stderr, but for now there is already precedent for the use of directing to /dev/null elsewhere in the codebase.
  • The lone CI check failure was related to the automated labeler not being able to apply a label (write access) when ran from a fork (known GitHub Actions issue with various workarounds)

@fallwith fallwith merged commit 94480a7 into newrelic:dev Feb 22, 2022
Copy link
Contributor

@fallwith fallwith left a comment

Choose a reason for hiding this comment

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

This change has been released in agent v8.5.0, available now from RubyGems.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community To tag external issues and PRs submitted by the community
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants