Changeset 14564 for trunk/base


Ignore:
Timestamp:
Oct 11, 2005, 8:17:42 PM (18 years ago)
Author:
jberry
Message:

When invoking the editor in the edit action, restore the entire start-time environment,
as the editor may want things from it, like TERM.

Thanks for testing, Joe Auty!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port/port.tcl

    r14563 r14564  
    33exec @TCLSH@ "$0" "$@"
    44# port.tcl
    5 # $Id: port.tcl,v 1.121 2005/10/11 20:09:47 jberry Exp $
     5# $Id: port.tcl,v 1.122 2005/10/11 20:17:42 jberry Exp $
    66#
    77# Copyright (c) 2004 Robert Shaw <rshaw@opendarwin.org>
     
    17411741                                       
    17421742                                        ed - edit {
     1743                                                # Restore our entire environment from start time
     1744                                                # We need it to evaluate the editor, and the editor
     1745                                                # may want stuff from it as well, like TERM.
     1746                                                array set env [array get boot_env]
     1747                                               
    17431748                                                # Find an editor to edit the portfile
    17441749                                                set editor ""
    17451750                                                foreach ed { VISUAL EDITOR } {
    1746                                                         if {[info exists boot_env($ed)]} {
    1747                                                                 set editor $boot_env($ed)
     1751                                                        if {[info exists env($ed)]} {
     1752                                                                set editor $env($ed)
    17481753                                                        }
    17491754                                                }
Note: See TracChangeset for help on using the changeset viewer.