brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.77k stars 2.32k forks source link

--help option broken on Linux builds #13614

Open acli opened 3 years ago

acli commented 3 years ago

Description

The --help command-line option is broken on the current Ubuntu build

Steps to Reproduce

  1. Install the build using the official instructions
  2. On the command line, run brave-browser --help

Actual result:

The brave-browser script returns

 No manual entry for brave

Expected result:

The manual entry for brave-browser(1) should show. The manual page exists

Reproduces how often:

Always

Brave version (brave://version info)

Version 1.18.78 Chromium: 87.0.4280.141 (Official Build) (64-bit)

Version/Channel Information:

Other Additional Information:

n/a

Miscellaneous Information:

n/a

fmarier commented 3 years ago

This switch is handled in Chrome using this code and it essentially just calls "man".

I found that all of these work:

man brave-browser-stable
man brave-browser-beta
man brave-browser

but not:

man brave

After instrumenting the code, I confirmed that binary.BaseName().value() maps to brave and so that's why the manpage can't be found.

fmarier commented 3 years ago

I found the root cause to be this customization we made in #4142 to the launcher/wrapper in order to work-around non-fatal crashes.

fmarier commented 3 years ago

It might be possible to change the value of argv[0] without using exec -a in /opt/brave.com/brave/brave-browser:

DeLuca-Agustin commented 3 years ago

I am having the same problem but I don't understand how to fix it