Skip to content

Commit

Permalink
For install action, abort if any @Version is provided on command line
Browse files Browse the repository at this point in the history
The install action has always ignored any @Version provided on the
command line.  This causes confusion for users so change to abort the
command and force user to remove the @Version.

Closes: https://trac.macports.org/ticket/60454
  • Loading branch information
kurthindenburg committed May 13, 2020
1 parent 2bc7cac commit 835a7db
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/port/port.tcl
Expand Up @@ -4765,6 +4765,13 @@ proc process_cmd { argv } {
}
}

if {$action eq "install"} {
array set portinfo [lindex $portlist 0]
if {[info exists portinfo(version)] && $portinfo(version) ne "" } {
fatal "install ignores the provided version $portinfo(version); remove it to continue."
}
}

# execute the action
set action_status [$action_proc $action $portlist [array get global_options]]

Expand Down

0 comments on commit 835a7db

Please sign in to comment.