Changeset 14565 for trunk/base


Ignore:
Timestamp:
Oct 11, 2005, 8:34:55 PM (19 years ago)
Author:
jberry
Message:

Catch and report nicely any error from editor invocation, just because
I know Juan will ask about it. Wait a minute...he already did! ;)

File:
1 edited

Legend:

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

    r14564 r14565  
    33exec @TCLSH@ "$0" "$@"
    44# port.tcl
    5 # $Id: port.tcl,v 1.122 2005/10/11 20:17:42 jberry Exp $
     5# $Id: port.tcl,v 1.123 2005/10/11 20:34:55 jberry Exp $
    66#
    77# Copyright (c) 2004 Robert Shaw <rshaw@opendarwin.org>
     
    17441744                                                # We need it to evaluate the editor, and the editor
    17451745                                                # may want stuff from it as well, like TERM.
    1746                                                 array set env [array get boot_env]
     1746                                                array unset env_save; array set env_save [array get env]
     1747                                                array unset env; array set env [array get boot_env]
    17471748                                               
    17481749                                                # Find an editor to edit the portfile
     
    17571758                                                        fatal "No EDITOR is specified in your environment"
    17581759                                                } else {
    1759                                                         eval exec $editor $portfile
    1760                                                 }                                               
     1760                                                        if {[catch {eval exec $editor $portfile} result]} {
     1761                                                                global errorInfo
     1762                                                                ui_debug "$errorInfo"
     1763                                                                fatal_softcontinue "unable to invoke editor: $result"
     1764                                                        }
     1765                                                }
     1766                                               
     1767                                                # Restore internal dp environment
     1768                                                array unset env; array set env [array get env_save]
    17611769                                        }
    17621770                                       
Note: See TracChangeset for help on using the changeset viewer.