[122307] branches/gsoc14-interactive/base/src/port/port.tcl
shasha at macports.org
shasha at macports.org
Sun Jul 20 06:32:25 PDT 2014
Revision: 122307
https://trac.macports.org/changeset/122307
Author: shasha at macports.org
Date: 2014-07-20 06:32:25 -0700 (Sun, 20 Jul 2014)
Log Message:
-----------
added check for stdout connected to tty
Modified Paths:
--------------
branches/gsoc14-interactive/base/src/port/port.tcl
Modified: branches/gsoc14-interactive/base/src/port/port.tcl
===================================================================
--- branches/gsoc14-interactive/base/src/port/port.tcl 2014-07-20 13:31:32 UTC (rev 122306)
+++ branches/gsoc14-interactive/base/src/port/port.tcl 2014-07-20 13:32:25 UTC (rev 122307)
@@ -5245,20 +5245,18 @@
# The default action to be taken in the occurence of a timeout.
proc ui_timeout {def timeout} {
# Gap between printing of each dot
- set step 250
- set multiplier 1
set sec 0
# Prints time like 5...4...3...2...1...0
while {$timeout >= 0} {
+ after $sec {puts -nonewline "\r"}
after $sec {puts -nonewline "Continuing in "}
- incr sec 1000
- after $sec puts -nonewline [format "%02d" $time]
+ incr sec 1000
+ after $sec puts -nonewline [format "%02d" $timeout]
after $sec flush stdout
- after $sec {puts -nonewline ". Press Ctrl-C to exit:"}
- after $sec {puts -nonewline "\r"}
- after $sec flush stdout
- incr time -1
+ after $sec {puts -nonewline ". Press Ctrl-C to exit: "}
+ after $sec flush stdout
+ incr timeout -1
}
after $sec set result def
vwait result
@@ -5473,6 +5471,7 @@
}
if {[isatty stdin]
+ && [isatty stdout]
&& (![info exists ui_options(ports_quiet)] || $ui_options(ports_quiet) ne "yes")
&& (![info exists ui_options(ports_noninteractive)] || $ui_options(ports_noninteractive) ne "yes")} {
set ui_options(questions_yesno) portclient::questions::ui_ask_yesno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140720/215e2b1f/attachment.html>
More information about the macports-changes
mailing list