Issue metadata
Sign in to add a comment
|
"/opt/google/chrome/chrome --version" subverts stdout capture |
||||||||||||||||||||||
Issue description
Chrome Version: 65.0.3325.27 and 66.0.3329.0
OS: Chrome (scarlet-release/R65-10323.8.0 and scarlet-release/R66-10359.0.0)
What steps will reproduce the problem?
Run:
# /opt/google/chrome/chrome --version
Google Chrome XX.0.YYYY.0 unknown
Run:
# echo $(/opt/google/chrome/chrome --version)
What is the expected result?
The second command will also print:
Google Chrome XX.0.YYYY.0 unknown
What happens instead?
Output is blank
This breaks scripts like dev_install, which do things like this to construct an update URL:
# Get the release number.
local cr_version="$(/opt/google/chrome/chrome --version)"
# Chrome version looks like (Google Chrome/Chromium) branch.0.a.b
local cr_branch="$(echo "${cr_version}" |
sed -r 's/.*[[:space:]]([0-9]+)\..*/\1/')"
local version="$(get_lsb_var /etc/lsb-release CHROMEOS_RELEASE_VERSION)"
release_number="R${cr_branch}-${version}"
,
Feb 9 2018
IIUC, this was working fine in M64. I don't even know who to bug for this sort of thing...
,
Feb 9 2018
we fixed this in issue 805443 ... do we need to cherry pick it back to M65 ? or are you just running an old image and you need to upgrade ?
,
Feb 9 2018
It does need cherry-picked to M65. For M66...I think I had an old image. But mostly because the canaries haven't built for over a week: bug 808434 . (R66-10359.0.0 is still the live canary for scarlet.) |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by briannorris@chromium.org
, Feb 9 2018strace clearly shows the difference between having stdout redirected and not. Without redirection, we print fine: fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 write(1, "Google Chrome 65.0.3325.27 unkno"..., 35Google Chrome 65.0.3325.27 unknown ) = 35 exit_group(0) = ? With it, we print nothing: fstat64(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 exit_group(0) = ? So somebody is probably doing something wrong with something like isatty()...