RESOLVED FIXED 228619
[git-webkit] Not all platforms support more -F
https://bugs.webkit.org/show_bug.cgi?id=228619
Summary [git-webkit] Not all platforms support more -F
Jonathan Bedard
Reported 2021-07-29 16:14:43 PDT
Seems like not all platforms support -F being passed to 'more'
Attachments
Patch (3.03 KB, patch)
2021-07-29 16:18 PDT, Jonathan Bedard
no flags
Patch for landing (2.79 KB, patch)
2021-07-30 08:40 PDT, Jonathan Bedard
no flags
Radar WebKit Bug Importer
Comment 1 2021-07-29 16:14:58 PDT
Jonathan Bedard
Comment 2 2021-07-29 16:18:14 PDT
Aakash Jain
Comment 3 2021-07-30 08:17:58 PDT
rs=me
Jonathan Bedard
Comment 4 2021-07-30 08:40:42 PDT
Created attachment 434633 [details] Patch for landing
EWS
Comment 5 2021-07-30 09:35:18 PDT
Committed r280478 (240113@main): <https://commits.webkit.org/240113@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 434633 [details].
Alexey Proskuryakov
Comment 6 2021-07-30 22:26:59 PDT
Comment on attachment 434633 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=434633&action=review > Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:124 > + more = subprocess.Popen([which('more')] + ['-F'] if platform.system() == 'Darwin' else [], stdin=child.stdout) Not new with this patch, but what is `which` doing here?
Jonathan Bedard
Comment 7 2021-08-02 08:25:18 PDT
Comment on attachment 434633 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=434633&action=review >> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:124 >> + more = subprocess.Popen([which('more')] + ['-F'] if platform.system() == 'Darwin' else [], stdin=child.stdout) > > Not new with this patch, but what is `which` doing here? It's coming a library, whichcraft (import on line 31), basically the cross-platform equivalent of running `/usr/bin/which more`. It's giving us the path to the `more` executable. I think it was Don Olmstead that recommended this approach for Windows when I was working on some of the git and svn stuff last year, and I've been doing it whenever we need to run shell commands on multiple platforms.
Alexey Proskuryakov
Comment 8 2021-08-02 10:26:34 PDT
it's almost certainly useless on Unix, as "which" won't find anything that Popen can't find on its own. Not sure what good it could be doing on Windows, but maybe there is some... witchcraft there.
Note You need to log in before you can comment on or make changes to this bug.