You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
Add prefix_unwritable check for selfupdate
Fail early with a good message if the user forgot to use sudo or otherwise can't write to the prefix. Fixes: https://trac.macports.org/ticket/48439
This commit is contained in:
@@ -2674,6 +2674,9 @@ proc action_select { action portlist opts } {
|
||||
|
||||
proc action_selfupdate { action portlist opts } {
|
||||
global global_options
|
||||
if {[prefix_unwritable]} {
|
||||
return 1
|
||||
}
|
||||
if { [catch {macports::selfupdate [array get global_options] base_updated} result ] } {
|
||||
global errorInfo
|
||||
ui_debug "$errorInfo"
|
||||
|
||||
Reference in New Issue
Block a user