From 6c90f7cf7f7207223734a2395c12164c3c88a499 Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Mon, 1 Jul 2019 14:32:56 +0000 Subject: Take missing TMPDIR for sudo on Darwin into account git-svn-id: svn://tug.org/texlive/trunk@51517 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/installer/install-tl-gui.tcl | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'Master/tlpkg/installer/install-tl-gui.tcl') diff --git a/Master/tlpkg/installer/install-tl-gui.tcl b/Master/tlpkg/installer/install-tl-gui.tcl index 4882f749b61..17d46eefa60 100755 --- a/Master/tlpkg/installer/install-tl-gui.tcl +++ b/Master/tlpkg/installer/install-tl-gui.tcl @@ -130,13 +130,17 @@ proc show_time {s} { # write to a logfile which is shared with the backend. # both parties open, append and close every time. -if {$::tcl_platform(os) eq "Darwin"} { - set ::dblfile "$::env(TMPDIR)/dblog" -} elseif {$::tcl_platform(platform) eq "unix"} { - set ::dblfile "/tmp/dblog" -} else { - set ::dblfile "$::env(TEMP)/dblog.txt" +set dblogdir "/tmp" +if [info exists ::env(TMPDIR)] { + set dblogdir $::env(TMPDIR) +} elseif [info exists ::env(TMP)] { + set dblogdir $::env(TMP) +} elseif [info exists ::env(TEMP)] { + set dblogdir $::env(TEMP) } +set ::dblfile [file join $dblogdir "dblog"] +unset dblogdir + proc dblog {s} { set db [open $::dblfile a] set t [get_stacktrace] @@ -1856,6 +1860,7 @@ proc main_prog {} { if [catch {open $cmd r+} ::inst] { err_exit "Error starting Perl backend" } + show_time "opened pipe" set ::perlpid [pid $::inst] -- cgit v1.2.3