Closed GoogleCodeExporter closed 8 years ago
Thanks for the feedback. So that we can investigate this further, can you
please provide the following:
- Full output of `gcloud info` (removing personal info).
- Full stack trace.
Original comment by vil...@google.com
on 8 Mar 2016 at 11:26
I think this is working as intended: we use the Python webbrowser module, which
has this to say about the $BROWSER environment variable
(https://docs.python.org/2/library/webbrowser.html):
If the environment variable BROWSER exists, it is interpreted to override the
platform default list of browsers, as a os.pathsep-separated list of browsers to
try in order. When the value of a list part contains the string %s, then it is
interpreted as a literal browser command line to be used with the argument URL
substituted for %s; if the part does not contain %s, it is simply interpreted as
the name of the browser to launch.
So
BROWSER='google-chrome --' python -c "import webbrowser; webbrowser.open('http://example.com/')"
doesn't work, but
BROWSER='google-chrome -- %s' python -c "import webbrowser; webbrowser.open('http://example.com/')"
does. The sources you link aren't as explicit as to what happens in the case
with no "%s" (and do seem to support your interpretation), but I don't think we
want to break with the Python implementation here, especially since you have a
workaround that makes both `gcloud` and `man` etc. happy.
Original comment by z...@google.com
on 9 Mar 2016 at 3:37
While I think that library is wrong (and/or $BROWSER is not really a standard),
that's a valid workaround -- let's hope everything else implements %s..
Original comment by tommi.vi...@gmail.com
on 9 Mar 2016 at 4:32
Original issue reported on code.google.com by
tommi.vi...@gmail.com
on 8 Mar 2016 at 11:17