Bug 173801

Summary: [GTK+] Homebrew is not allowed to run any script under sudo.
Product: WebKit Reporter: YuHang <yhorg>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: agomez, ashvayka, clopez, commit-queue, dhaval, ews-watchlist, lforschler, ltilve, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/WebKit/webkit/blob/master/Tools/gtk/install-dependencies#L3
Attachments:
Description Flags
Patch none

Description YuHang 2017-06-23 18:29:10 PDT
/Tools/gtk/install-dependencies

... line 3
# This script needs to be run with root rights.
if [ $UID -ne 0 ]; then
    sudo $0
    exit 0
fi


These code snippet will cause error while installing dependencies.
Comment 1 overclockedllama 2019-02-02 11:20:28 PST
fix proposed at https://github.com/WebKit/webkit/pull/30
Comment 2 Alexey Shvayka 2019-06-10 19:48:24 PDT
Created attachment 371812 [details]
Patch
Comment 3 Alexey Shvayka 2019-06-10 19:52:52 PDT
Tools/gtk/install-dependencies works fine for me w/o root privileges.
Homebrew 2.1.4
macOS 10.14.4
Comment 4 overclockedllama 2019-06-11 12:00:41 PDT
Yeah that patch makes more sense. Brew should not run as root.
Comment 5 WebKit Commit Bot 2019-08-12 17:52:55 PDT
Comment on attachment 371812 [details]
Patch

Clearing flags on attachment: 371812

Committed r248584: <https://trac.webkit.org/changeset/248584>
Comment 6 WebKit Commit Bot 2019-08-12 17:52:57 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-08-12 17:53:20 PDT
<rdar://problem/54235619>