Bug 2189126 - gh prints out a useless egrep warning
Summary: gh prints out a useless egrep warning
Keywords:
Status: CLOSED DUPLICATE of bug 2140197
Alias: None
Product: Fedora
Classification: Fedora
Component: gh
Version: 38
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Mikel Olasagasti Uranga
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-24 09:45 UTC by Jouni Seppänen
Modified: 2023-04-24 10:52 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-04-24 10:52:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jouni Seppänen 2023-04-24 09:45:11 UTC
Description of problem:

With some commands, e.g. `gh pr view --web` the last line of output is

    egrep: warning: egrep is obsolescent; using grep -E

Presumably gh is calling out to an outdated command and should use another command instead.

Version-Release number of selected component (if applicable):

gh-2.27.0-1.fc38.x86_64

How reproducible:

Every time

Steps to Reproduce:
1. find a git repository that has a corresponding GitHub project, and a PR open
2. run `gh pr view --web`
3. observe the output

Actual results:

Opening github.com/... in your browser.
egrep: warning: egrep is obsolescent; using grep -E

Expected results:

Opening github.com/... in your browser.

Additional info:

egrep from grep-3.8-3.fc38.x86_64

Comment 1 Mikel Olasagasti Uranga 2023-04-24 10:38:33 UTC
Not able to reproduce with same release and package versions. 

- What browser are you using?
- Do you have any environment variable for `GH_BROWSER` or `BROWSER`? 

  $ env |grep -i browser

Comment 2 Jouni Seppänen 2023-04-24 10:48:13 UTC
I'm using Firefox, and I don't have either of those environment variables set.

I used strace to figure out what gets executed, and the culprit seems to be xdg-open. Indeed, `grep egrep /usr/bin/xdg-open` finds an invocation of egrep.

Comment 3 Jouni Seppänen 2023-04-24 10:52:34 UTC
I suppose this is a duplicate of 2140197.

*** This bug has been marked as a duplicate of bug 2140197 ***


Note You need to log in before you can comment on or make changes to this bug.