martinvonz added a comment.
In D6782#99619 <https://phab.mercurial-scm.org/D6782#99619>, @yuja wrote: >> @@ -245,8 +245,11 @@ >> >> pycompat.fsencode(getattr(mainmod, '__file__', ''))) == 'hg'): >> _sethgexecutable(pycompat.fsencode(mainmod.__file__)) >> else: >> >> - exe = findexe('hg') or os.path.basename(sys.argv[0]) >> - _sethgexecutable(pycompat.fsencode(exe)) >> >> + exe = findexe('hg') >> + if exe: >> + _sethgexecutable(pycompat.fsencode(exe)) >> + else: >> + _sethgexecutable(os.path.basename(pycompat.sysargv[0])) > > `findexe()` is supposed to return bytes. If not always, it's the bug > of `findexe()`. Oh, `findexe()` is our own function. I somehow thought it was from the standard library. I'll send another follow-up. Thanks. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6782/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6782 To: martinvonz, #hg-reviewers Cc: yuja, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel